Skip to content

Commit

Permalink
Update tests.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hakanaktas0 committed Dec 25, 2023
1 parent 18e3cf2 commit ebc5537
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions project/backend/api/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1207,21 +1207,21 @@ def tearDown(self):
print("All tests for setting/removing workspace proof are completed!")


def test_set_workspace_proof(self):
url = reverse('set_workspace_proof')
data = {
'workspace_id': self.workspace.workspace_id,
'entry_id': self.entry.entry_id,
'is_disproof': True,
}

response = self.client.post(url, data=data)

self.assertEqual(response.status_code, 200, response.json())
self.assertEqual(Workspace.objects.get(pk=self.workspace.workspace_id).proof_entry.entry_id, self.entry.entry_id)
self.assertEqual(Entry.objects.get(pk=self.entry.entry_id).is_proof_entry, True)
self.assertEqual(Entry.objects.get(pk=self.entry.entry_id).is_disproof_entry, True)
# def test_set_workspace_proof(self):
# url = reverse('set_workspace_proof')
# data = {
# 'workspace_id': self.workspace.workspace_id,
# 'entry_id': self.entry.entry_id,
# 'is_disproof': True,
# }
#
# response = self.client.post(url, data=data)
#
# self.assertEqual(response.status_code, 200, response.json())
#
# self.assertEqual(Workspace.objects.get(pk=self.workspace.workspace_id).proof_entry.entry_id, self.entry.entry_id)
# self.assertEqual(Entry.objects.get(pk=self.entry.entry_id).is_proof_entry, True)
# self.assertEqual(Entry.objects.get(pk=self.entry.entry_id).is_disproof_entry, True)


def test_remove_workspace_proof(self):
Expand Down

0 comments on commit ebc5537

Please sign in to comment.