From a96757ca2b7c8653ed7c214c59484bd8ef0be802 Mon Sep 17 00:00:00 2001 From: RamezIssac Date: Mon, 24 Jul 2023 21:56:27 +0200 Subject: [PATCH] Update the tests and version bump --- CHANGELOG.rst | 5 +++++ README.rst | 19 ++++++++++++++++++- tabular_permissions/__init__.py | 2 +- tests/requirements.txt | 4 ++-- tests/test_tabular_permissions/tests.py | 2 ++ 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 50135fb..034768a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,11 @@ ---------- CHANGELOG ---------- + v 2.9.2 (24 July 2023) + - Update readme to show how to run tests + - update demo project to use Django latest releases + - Enhance the tests to cover more. + v 2.9.1 (7 June 2022) - Django 4 Upgrade. (@youssriaboelseod) diff --git a/README.rst b/README.rst index 3d48d50..29f8a6c 100644 --- a/README.rst +++ b/README.rst @@ -1,3 +1,4 @@ + django-tabular-permissions ########################## Display django permissions in a user friendly, translatable and customizable widget . @@ -150,7 +151,23 @@ To run the demo project in the repo on your local you need 4. `python manage.py migrate` 5. `python manage.py runserver` -Enjoy and feel free to report any bugs or make pull requests. + +Tests +----- + +To run the tests, you need to install the test requirements:: + + cd tests + pip install -r requirements.txt + +Then run:: + + python runtests.py + +With Coverage :: + + coverage run runtests.py + coverage html Cross Reference diff --git a/tabular_permissions/__init__.py b/tabular_permissions/__init__.py index b03f5b5..c0d35b3 100644 --- a/tabular_permissions/__init__.py +++ b/tabular_permissions/__init__.py @@ -1 +1 @@ -__version__ = '2.9.1' +__version__ = '2.9.2' diff --git a/tests/requirements.txt b/tests/requirements.txt index 309e1b2..315f0ef 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,2 +1,2 @@ -selenium -pyquery \ No newline at end of file +pyquery +coverage diff --git a/tests/test_tabular_permissions/tests.py b/tests/test_tabular_permissions/tests.py index bc13409..36ee99a 100644 --- a/tests/test_tabular_permissions/tests.py +++ b/tests/test_tabular_permissions/tests.py @@ -149,3 +149,5 @@ def test_initial_widget_is_visible_on_extra_permissions(self): doc = pq(response.content) table = doc.find('[name=user_permissions]') self.assertEqual(len(table), 1) + custom_perm = doc.find("#id__can_do_something") + self.assertEqual(len(custom_perm), 1)