Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
Update dependencies and run tests for django 3.1 (#43)
Browse files Browse the repository at this point in the history
* Update dependencies and run tests for django 31

* Test django31

* Bump versions

* Add env file
  • Loading branch information
adinhodovic authored Jan 28, 2021
1 parent 68ba930 commit 53652aa
Show file tree
Hide file tree
Showing 9 changed files with 502 additions and 464 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export DJANGO_SETTINGS_MODULE=tests.settings
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
strategy:
max-parallel: 3
matrix:
python-version: [3.7, 3.8]
dj-version: [django22, django30, djangomaster]
python-version: [3.8, 3.9]
dj-version: [django22, django30, django31, djangomaster]

steps:
- uses: actions/checkout@v1
Expand Down
6 changes: 4 additions & 2 deletions django_google_optimize/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ def get_experiments_variants(request):
return active_experiments


def _parse_experiments(request,):
def _parse_experiments(
request,
):
ga_exp = request.COOKIES.get("_gaexp")

experiment_variations = {}
Expand All @@ -68,7 +70,7 @@ def _parse_experiments(request,):
cookies = ExperimentCookie.objects.filter(active=True)
for cookie in cookies:
experiment_variations[
cookie.experiment.experiment_id
cookie.experiment.experiment_id # type: ignore
] = cookie.active_variant_index
if experiment_variations:
return experiment_variations
Expand Down
Loading

0 comments on commit 53652aa

Please sign in to comment.