diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 2e454c2..191b907 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -106,7 +106,7 @@ jobs: env: DATABASE_ENGINE: ${{ matrix.database }} run: | - coverage run --append --source=admin_interface setup.py test + coverage run --append --source=admin_interface runtests.py coverage xml -o ./coverage.xml - name: Upload coverage to Codecov diff --git a/admin_interface/static/admin_interface/magnific-popup/jquery.magnific-popup.js b/admin_interface/static/admin_interface/magnific-popup/jquery.magnific-popup.js index f06f96d..2d4a921 100755 --- a/admin_interface/static/admin_interface/magnific-popup/jquery.magnific-popup.js +++ b/admin_interface/static/admin_interface/magnific-popup/jquery.magnific-popup.js @@ -1808,7 +1808,7 @@ _mfpTrigger('LazyLoad', item); if(item.type === 'image') { - item.img = $('').on('load.mfploader', function() { + item.img = $('').on('load.mfploader', function() { item.hasSize = true; }).on('error.mfploader', function() { item.hasSize = true; @@ -1864,4 +1864,4 @@ /*>>retina*/ _checkInstance(); -})); \ No newline at end of file +})); diff --git a/admin_interface/templates/admin/base_site.html b/admin_interface/templates/admin/base_site.html index 9c8fb8c..b6595ca 100644 --- a/admin_interface/templates/admin/base_site.html +++ b/admin_interface/templates/admin/base_site.html @@ -92,33 +92,33 @@ href="{% static 'admin_interface/css/rangefilter.css' %}?v={{ version_md5_cache }}"> {% if not theme.recent_actions_visible %} + href="{% static 'admin_interface/css/recent-actions.css' %}?v={{ version_md5_cache }}"> {% endif %} + href="{% static 'admin_interface/css/related-modal.css' %}?v={{ version_md5_cache }}"> + href="{% static 'admin_interface/css/streamfield.css' %}?v={{ version_md5_cache }}"> + href="{% static 'admin_interface/css/jquery.ui.tabs.css' %}?v={{ version_md5_cache }}"> + href="{% static 'admin_interface/css/modeltranslation.css' %}?v={{ version_md5_cache }}"> + href="{% static 'admin_interface/css/sorl-thumbnail.css' %}?v={{ version_md5_cache }}"> + href="{% static 'admin_interface/css/ckeditor.css' %}?v={{ version_md5_cache }}"> + href="{% static 'admin_interface/css/tinymce.css' %}?v={{ version_md5_cache }}"> + href="{% static 'admin_interface/css/json-widget.css' %}?v={{ version_md5_cache }}"> + href="{% static 'admin_interface/css/import-export.css' %}?v={{ version_md5_cache }}"> + href="{% static 'admin_interface/css/rtl.css' %}?v={{ version_md5_cache }}"> {% if current_lang == 'fa' %} - + {% endif %} {% endblock %} diff --git a/runtests.py b/runtests.py index 9c83e95..06e1173 100755 --- a/runtests.py +++ b/runtests.py @@ -12,8 +12,9 @@ def runtests(): TestRunner = get_runner(settings) test_runner = TestRunner() failures = test_runner.run_tests(["tests"]) - sys.exit(bool(failures)) + return failures if __name__ == "__main__": - runtests() + failures = runtests() + sys.exit(bool(failures)) diff --git a/setup.py b/setup.py index 738a6a2..3364db4 100644 --- a/setup.py +++ b/setup.py @@ -80,5 +80,4 @@ setup( "Programming Language :: Python :: 3.11", "Topic :: Software Development :: Build Tools", ], - test_suite="runtests.runtests", ) diff --git a/tests/test_models.py b/tests/test_models.py index de12268..1b3a5a4 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -89,7 +89,7 @@ class AdminInterfaceModelsTestCase(TestCase): def test_str(self): theme = Theme.get_active_theme() - self.assertEqual(f"{theme}", "Django") + self.assertEqual(str(theme), "Django") # class AdminInterfaceModelsMultiDBTestCase(TestCase): diff --git a/tox.ini b/tox.ini index 2471ec1..bbca603 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,6 @@ python = 3.11: py311 [testenv] -passenv = CI,GITHUB_WORKFLOW deps = dj22: Django == 2.2.* dj30: Django == 3.0.* @@ -30,7 +29,7 @@ setenv = # mysql: DATABASE_ENGINE=mysql postgres: DATABASE_ENGINE=postgres commands = - coverage run --append --source=admin_interface setup.py test + coverage run --append --source=admin_interface runtests.py coverage report -m codecov