From 0854f7d1fc8859fbabcd591a39c9bc988c4e4ee0 Mon Sep 17 00:00:00 2001 From: AaronKable Date: Sun, 4 Oct 2020 21:06:50 +0800 Subject: [PATCH] add forgoten test and version bump --- wikijs/__init__.py | 2 +- wikijs/test.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/wikijs/__init__.py b/wikijs/__init__.py index 94de793..3e668c1 100644 --- a/wikijs/__init__.py +++ b/wikijs/__init__.py @@ -1 +1 @@ -VERSION = "0.0.3" \ No newline at end of file +VERSION = "0.0.4" \ No newline at end of file diff --git a/wikijs/test.py b/wikijs/test.py index 55c1687..20644c3 100644 --- a/wikijs/test.py +++ b/wikijs/test.py @@ -28,6 +28,8 @@ def setUp(self): self.none_user = 'none_user' none_user = AuthUtils.create_user(self.none_user) self.service = WikiJSService + self.del_user = 'del_user' + del_user = AuthUtils.create_user(self.del_user) add_permissions() def test_has_account(self): @@ -45,6 +47,9 @@ def test_service_enabled(self): self.assertTrue(service.service_active_for_user(member)) self.assertFalse(service.service_active_for_user(none_user)) + def test_delete_user_with_no_wiki(self): #this deosnt fail properly on sqlite investigate more tests on mysql/psql + none_user = User.objects.get(username=self.del_user).delete() + @mock.patch(MODULE_PATH + '.manager.WikiJSManager._update_user') def test_update_user(self, disable): disable.execute.return_value = True @@ -91,7 +96,6 @@ def test_validate_user(self, disable): def test_delete_user(self, disable): disable.execute.return_value = '{"data": {"users": {"deactivate": {"responseResult": {"succeeded": true}}}}}' member = User.objects.get(username=self.member) - service = self.service() result = service.delete_user(member)