Пример #1
0
    def test_return_204_even_if_no_delete(self):
        account_id = server.get_next_id()
        account_response = self.app.delete('/accounts/' + account_id)

        self.assertTrue(account_response.status_code == HTTP_204_NO_CONTENT)
Пример #2
0
 def test_without_nextId(self):
     server.redis_server.flushdb()
     self.assertTrue(server.get_next_id() == None)
     server.inititalize_redis()
     self.assertTrue(server.get_next_id() == "1")
Пример #3
0
    def test_get_an_account_by_id_returns_404_for_id_that_does_not_exist_yet(
            self):
        account_id = server.get_next_id()
        account_response = self.app.get('/accounts/' + account_id)

        self.assertTrue(account_response.status_code == HTTP_404_NOT_FOUND)