Skip to content

Commit

Permalink
add forgoten test and version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
pvyParts committed Oct 4, 2020
1 parent c630583 commit 0854f7d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wikijs/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "0.0.3"
VERSION = "0.0.4"
6 changes: 5 additions & 1 deletion wikijs/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 0854f7d

Please sign in to comment.