Example #1
0
 def test_member_delete():
     r = tests.t_delete("/api/v1/roles/the-a-team/0")
     assert r.status_code == 401
     r = tests.a_delete("/api/v1/roles/the-a-team/0")
     assert r.status_code == 200
     r = tests.a_get("/api/v1/roles/the-a-team/0")
     assert r.status_code == 404
Example #2
0
 def test_ticket_delete(self):
     r = tests.t_delete("/api/v1/tickets/the-a-team/TEST/TEST-10")
     assert r.status_code == 401
     r = tests.a_delete("/api/v1/tickets/the-a-team/TEST/TEST-10")
     assert r.status_code == 200
     r = tests.a_get("/api/v1/tickets/the-a-team/TEST/TEST-10")
     assert r.status_code == 404
Example #3
0
 def test_team_delete():
     r = tests.t_delete("/api/v1/teams/the-a-team")
     assert r.status_code == 401
     r = tests.a_delete("/api/v1/teams/the-a-team")
     assert r.status_code == 200
     r = tests.a_get("/api/v1/teams/the-a-team")
     assert r.status_code == 404
Example #4
0
 def test_member_delete():
     r = tests.t_delete("/api/v1/roles/the-a-team/0")
     assert r.status_code == 401
     r = tests.a_delete("/api/v1/roles/the-a-team/0")
     assert r.status_code == 200
     r = tests.a_get("/api/v1/roles/the-a-team/0")
     assert r.status_code == 404
Example #5
0
 def test_status_delete():
     r = tests.t_delete("/api/v1/statuses/2")
     assert r.status_code == 401
     r = tests.a_delete("/api/v1/statuses/2")
     assert r.status_code == 403
     r = tests.a_delete("/api/v1/statuses/2", admin=True)
     assert r.status_code == 200
Example #6
0
 def test_project_delete():
     r = tests.t_delete("/api/v1/projects/the-a-team/TEST2")
     assert r.status_code == 401
     r = tests.a_delete("/api/v1/projects/the-a-team/TEST2")
     assert r.status_code == 200
     r = tests.a_get("/api/v1/projects/the-a-team/TEST2")
     assert r.status_code == 404
Example #7
0
 def test_field_delete(self):
     r = tests.t_delete("/api/v1/fields/1")
     assert r.status_code == 401
     r = tests.a_delete("/api/v1/fields/1")
     assert r.status_code == 200
     r = tests.a_get("/api/v1/fields/1")
     assert r.status_code == 404
Example #8
0
 def test_field_delete(self):
     r = tests.t_delete("/api/v1/fields/1")
     assert r.status_code == 401
     r = tests.a_delete("/api/v1/fields/1")
     assert r.status_code == 200
     r = tests.a_get("/api/v1/fields/1")
     assert r.status_code == 404
Example #9
0
 def test_team_delete():
     r = tests.t_delete("/api/v1/teams/the-a-team")
     assert r.status_code == 401
     r = tests.a_delete("/api/v1/teams/the-a-team")
     assert r.status_code == 200
     r = tests.a_get("/api/v1/teams/the-a-team")
     assert r.status_code == 404
Example #10
0
 def test_user_delete():
     r = tests.t_delete("/api/v1/users/lionize")
     assert r.status_code == 401
     r = tests.a_delete("/api/v1/users/lionize")
     assert r.status_code == 403
     r = tests.a_delete("/api/v1/users/lionize", admin=True)
     assert r.status_code == 200
     r = tests.a_get("/api/v1/users/lionize")
     assert r.status_code == 404
Example #11
0
 def test_user_delete():
     r = tests.t_delete("/api/v1/users/lionize")
     assert r.status_code == 401
     r = tests.a_delete("/api/v1/users/lionize")
     assert r.status_code == 403
     r = tests.a_delete("/api/v1/users/lionize", admin=True)
     assert r.status_code == 200
     r = tests.a_get("/api/v1/users/lionize")
     assert r.status_code == 404