1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2024-11-27 06:13:02 +00:00

Fix CI, add django22-py39 CI step

This commit is contained in:
Yohann D'ANELLO 2020-12-28 22:55:48 +01:00
parent 4de83344a7
commit 574233acd0
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
3 changed files with 14 additions and 3 deletions

View File

@ -26,6 +26,17 @@ py38-django22:
python3-docutils python3-pil python3-tz python3-six python3-sqlparse python3-stdnum python3-yaml python3-coreapi tox
script: tox -e py38
py39-django22:
stage: test
image: debian:bullseye
before_script:
- >
apt-get update &&
apt-get install --no-install-recommends -y
python3-django python3-django-casclient python3-django-reversion python3-djangorestframework
python3-docutils python3-pil python3-tz python3-six python3-sqlparse python3-stdnum python3-yaml python3-coreapi tox
script: tox -e py39
linters:
stage: quality-assurance
image: debian:buster-backports

View File

@ -93,9 +93,9 @@ class MediaAdminForm(ModelForm):
side_identifier_field.widget.template_name = "media/generate_side_identifier.html"
def download_data_isbndb(self, isbn):
api_url = "https://api2.isbndb.com/book/" + str(isbn) + "?Authorization=" + os.getenv("ISBNDB_KEY")
api_url = "https://api2.isbndb.com/book/" + str(isbn) + "?Authorization=" + os.getenv("ISBNDB_KEY", "")
req = urllib.request.Request(api_url)
req.add_header("Authorization", os.getenv("ISBNDB_KEY"))
req.add_header("Authorization", os.getenv("ISBNDB_KEY", ""))
try:
with urllib.request.urlopen(req) as url:
data: dict = json.loads(url.read().decode())["book"]

View File

@ -1,5 +1,5 @@
[tox]
envlist = py37,py38,linters
envlist = py37,py38,py39,linters
skipsdist = True
[testenv]