IEEE.org     |     IEEE Xplore Digital Library     |     IEEE Standards     |     IEEE Spectrum     |     More Sites

Verified Commit f7508365 authored by Emi Simpson's avatar Emi Simpson
Browse files

[new arch] Test DeleteProject

parent b5bd550d
Pipeline #868 passed with stage
in 1 minute
......@@ -322,3 +322,21 @@ class TestQueries(unittest.TestCase):
Exception,
remove_owner.handle_results,
SqlIntegrityError(SqlErrorCode.BAD_NULL_ERROR, 'unexpected'))
def test_delete_project(self):
delete_proj = DeleteProject(ProjectID(UncheckedPID(1312)))
self.assertEqual(
delete_proj.get_query(),
QueryRequest(
'DELETE FROM projects WHERE project_id = %s;' ,
(1312,)))
self.assertEqual(
delete_proj.handle_results(QueryResult(1, -1, panic, panic)),
Finished(None))
self.assertEqual(
delete_proj.handle_results(none_result),
Error(None))
self.assertRaises(
Exception,
delete_proj.handle_results,
SqlIntegrityError(SqlErrorCode.BAD_NULL_ERROR, 'unexpected'))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment