def test_put_200OK(self): key = "key1" value = "val1" new_value = "new_val1" self.api.post("/dictionary/", {"key": key, "value": value}) self.assertEquals(make_result(new_value), self.api.put("/dictionary/", {"key": key, "value": new_value})) self.api.delete("/dictionary/", {"key": key})
def test_get_200(self): key = "key1" value = "val1" self.api.post("/dictionary/", {"key": key, "value": value}) self.assertEquals(make_result(value), self.api.get("/dictionary/", key=key)) self.api.delete("/dictionary/", {"key": key})
def test_delete_200OK_bad_kee(self): self.assertEquals(make_result(None), self.api.delete("/dictionary/", {"key": "bad_key"}))
def test_post_200OK(self): key = "key" value = "val" self.assertEquals(make_result(value), self.api.post("/dictionary/", {"key": key, "value": value})) self.api.delete("/dictionary/", {"key": key})