예제 #1
0
 def test_update_user(self):
     User.update("handle", name="name", access_role="ro", email="email", disabled="disabled")
     self.request_called_with(
         "PUT",
         "https://example.com/api/v1/user/handle",
         data={"name": "name", "access_role": "ro", "email": "email", "disabled": "disabled"}
     )
예제 #2
0
 def test_create_user(self):
     User.create(handle="handle", name="name", access_role="ro")
     self.request_called_with("POST",
                              "https://example.com/api/v1/user",
                              data={
                                  "handle": "handle",
                                  "name": "name",
                                  "access_role": "ro"
                              })
예제 #3
0
 def test_get_all_users(self):
     User.get_all()
     self.request_called_with("GET", "https://example.com/api/v1/user")
예제 #4
0
 def test_delete_user(self):
     User.delete("handle")
     self.request_called_with("DELETE",
                              "https://example.com/api/v1/user/handle")
예제 #5
0
 def test_get_user(self):
     User.get("handle")
     self.request_called_with("GET",
                              "https://example.com/api/v1/user/handle")