Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dchhabda committed Oct 17, 2022
1 parent d83caa9 commit 2a09edb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1480,3 +1480,12 @@ def test_announcement_delete_json(self):
assert data['status'] == 'success'
announcements = announcement_repo.get_all_announcements()
assert len(announcements) == 0, announcements

@with_context
@patch('pybossa.view.admin.perform_completed_tasks_cleanup')
def test_admin_cleanuptasks(self, mock_cleanuptasks):
"""Test ADMIN JSON index page works"""
self.register()
self.signin()
res = self.app_get_json("/admin/cleanuptasks")
mock_cleanuptasks.assert_called()

0 comments on commit 2a09edb

Please sign in to comment.