Exemple #1
0
 def test_member_create():
     r = tests.t_post("/api/v1/roles/the-a-team/TEST2", {
         "user": {
             "username": "******",
         },
         "role": "admin",
     })
     assert r.status_code == 401
     r = tests.t_post("/api/v1/roles/the-a-team/TEST2", {
         "user": {
             "username": "******",
         },
         "role": "admin",
     })
     assert r.status_code == 200
Exemple #2
0
 def test_member_create():
     r = tests.t_post("/api/v1/roles/the-a-team/TEST2",
                      {
                          "user": {
                              "username": "******",
                          },
                          "role": "admin",
                      })
     assert r.status_code == 401
     r = tests.t_post("/api/v1/roles/the-a-team/TEST2",
                      {
                          "user": {
                              "username": "******",
                          },
                          "role": "admin",
                      })
     assert r.status_code == 200
Exemple #3
0
 def test_user_create():
     r = tests.t_post("/api/v1/users",
                      {
                          "username": "******",
                          "email": "*****@*****.**",
                          "fullName": "Integration Test",
                      })
     assert r.status_code == 200
 def test_user_create():
     r = tests.t_post(
         "/api/v1/users", {
             "username": "******",
             "email": "*****@*****.**",
             "fullName": "Integration Test",
         })
     assert r.status_code == 200
 def test_status_create():
     r = tests.t_post("/api/v1/statuses", {
         "name": "Integration Testing",
         "status_type": "DONE",
     })
     assert r.status_code == 401
     r = tests.a_post("/api/v1/statuses", {
         "name": "Integration Testing",
         "status_type": "DONE",
     })
     assert r.status_code == 200
 def test_field_create(self):
     r = tests.t_post("/api/v1/fields", {
         "name": "Unit Test Field",
         "data_type": "STRING",
     })
     assert r.status_code == 401
     r = tests.a_post("/api/v1/fields", {
         "name": "Unit Test Field",
         "data_type": "STRING",
     })
     assert r.status_code == 200
Exemple #7
0
 def test_field_create(self):
     r = tests.t_post("/api/v1/fields",
                          {
                              "name": "Unit Test Field",
                              "data_type": "STRING",
                          })
     assert r.status_code == 401
     r = tests.a_post("/api/v1/fields",
                          {
                              "name": "Unit Test Field",
                              "data_type": "STRING",
                          })
     assert r.status_code == 200
Exemple #8
0
 def test_team_create():
     r = tests.t_post("/api/v1/teams",
                      {
                          "name": "The C Team",
                          "description": "A unit testing experience.",
                          "project_lead": {
                              "username": "******",
                          },
                      })
     assert r.status_code == 401
     r = tests.a_post("/api/v1/teams",
                      {
                          "name": "The C Team",
                          "description": "A unit testing experience.",
                          "project_lead": {
                              "username": "******",
                          },
                      })
     assert r.status_code == 200
 def test_team_create():
     r = tests.t_post(
         "/api/v1/teams", {
             "name": "The C Team",
             "description": "A unit testing experience.",
             "project_lead": {
                 "username": "******",
             },
         })
     assert r.status_code == 401
     r = tests.a_post(
         "/api/v1/teams", {
             "name": "The C Team",
             "description": "A unit testing experience.",
             "project_lead": {
                 "username": "******",
             },
         })
     assert r.status_code == 200
Exemple #10
0
 def test_ticket_create(self):
     r = tests.t_post("/api/v1/tickets/the-a-team/TEST/tickets",
                      {
                          "summary": "This is a unit test ticket.",
                          "description": "I hope this unit test passes.",
                          "reporter": {
                              "username": "******",
                              "email": "*****@*****.**",
                              "fullName": "Test Testerson",
                          },
                      })
     assert r.status_code == 401
     r = tests.a_post("/api/v1/tickets/the-a-team/TEST/tickets",
                      {
                          "summary": "This is a unit test ticket.",
                          "description": "I hope this unit test passes.",
                          "reporter": {
                              "username": "******",
                              "email": "*****@*****.**",
                              "fullName": "Test Testerson",
                          },
                      })
     assert r.status_code == 200