Skip to content

Commit

Permalink
chore: fixing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
awais786 committed Dec 4, 2023
1 parent da64bcd commit 44809b6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
5 changes: 3 additions & 2 deletions repo_health/check_django_dependencies_compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,9 @@ def get_upgraded_dependencies_count(repo_path, django_dependency_sheet) -> tuple
package_name = line["Django Package Name"]
if package_name in deps.keys(): # pylint: disable=consider-iterating-dictionary
django_deps.append(package_name)

if line["Django 3.2"] and line["Django 3.2"] != '-':
# If the package support is included in the master branch but hasn't been released,
# it won't be regarded as a supported version.
if line["Django 3.2"] and line["Django 3.2"] not in ['-', 'master']:
deps_support_django32.append(package_name)

if parse(deps[package_name]) >= parse(line["Django 3.2"]):
Expand Down
5 changes: 1 addition & 4 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
# This file contains all common constraints for edx-repos
-c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt

# greater version breaking test.
packaging==21.3

# gspread==5.12.0 contains breaking changes
# gspread==5.12.0 contains breaking changes
# which break the scheduled repo health job
gspread<5.12.0
2 changes: 1 addition & 1 deletion tests/data/mock_django_dependencies_sheet.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
40,edx-opaque-keys,yes,-,2.2.0,2.2.0,-,"Feb 1, 2021",,,
103,django-storages,,1.11,1.8,1.1,-,"Jun 21, 2021",https://github.com/edx/upgrades/issues/44,,
110,edx-django-utils,yes,-,master,4.2.0,4.2.0,"Jul 14, 2021",BOM-2634,,
30,djangorestframework,,3.12.3,3.11.0,3.12.0,p,"Jun 30, 2021",,,3.12.4
30,djangorestframework,,3.12.3,3.11.0,3.12.0,4.2,"Jun 30, 2021",,,3.12.4
29,django-waffle,,2.2.0,0.19.0,2.0.0,-,"May 22, 2021",,,
2 changes: 1 addition & 1 deletion tests/test_check_django_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_django_deps_upgrade(repo_path):
assert 'edx-django-utils' in all_results[MODULE_DICT_KEY]['django_32']['list']

assert 'edx-django-utils' not in all_results[MODULE_DICT_KEY]['upgraded']['list']
assert 'djangorestframework' in all_results[MODULE_DICT_KEY]['upgraded']['list']
assert 'djangorestframework' not in all_results[MODULE_DICT_KEY]['upgraded']['list']


@pytest.mark.parametrize("repo_path", [get_repo_path("js_repo")])
Expand Down

0 comments on commit 44809b6

Please sign in to comment.