Skip to content

Commit 06d83f0

Browse files
committed
fix: updating tests
1 parent cd3a4a2 commit 06d83f0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/test_todo_resource.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@ def create_todo(self, title="Test todo", description="Test todo description"):
4040

4141
def test_create_todo(self):
4242
response = self.client.post(
43-
"/api/v1/todo",
43+
"/api/v1/todos",
4444
json={"title": "Test Todo", "description": "Test todo description"})
4545
self.assertEqual(response.status_code, 201)
4646

4747
def test_get_todos(self):
48-
response = self.client.get("/api/v1/todo")
48+
response = self.client.get("/api/v1/todos")
4949
self.assertEqual(response.status_code, 200)
5050

5151
def test_update_todo(self):
5252
todo = self.create_todo()
5353

5454
response = self.client.put(
55-
f"/api/v1/todo/{todo.id}",
55+
f"/api/v1/todos/{todo.id}",
5656
data=json.dumps({"title": "Updated test todo",
5757
"description": "Updated test todo description"}),
5858
content_type="application/json",
@@ -61,18 +61,18 @@ def test_update_todo(self):
6161

6262
def test_delete_todo(self):
6363
todo = self.create_todo()
64-
response = self.client.delete(f"/api/v1/todo/{todo.id}")
64+
response = self.client.delete(f"/api/v1/todos/{todo.id}")
6565
self.assertEqual(response.status_code, 204)
6666

6767
def test_get_todo(self):
6868
todo = self.create_todo()
6969

70-
response = self.client.get(f"/api/v1/todo/{todo.id}")
70+
response = self.client.get(f"/api/v1/todos/{todo.id}")
7171
self.assertEqual(response.status_code, 200)
7272

7373
def test_invalid_input(self):
7474
response = self.client.post(
75-
"/api/v1/todo",
75+
"/api/v1/todos",
7676
json={
7777
"description": "Test todo description",
7878
"done": False,
@@ -82,7 +82,7 @@ def test_invalid_input(self):
8282

8383
def test_update_nonexistent_todo(self):
8484
response = self.client.put(
85-
"/api/v1/todo/99999999",
85+
"/api/v1/todos/99999999",
8686
json={
8787
"title": "Updated test todo",
8888
"description": "Updated test todo description",
@@ -93,7 +93,7 @@ def test_update_nonexistent_todo(self):
9393

9494
def test_delete_nonexistent_todo(self):
9595
response = self.client.delete(
96-
"/api/v1/todo/99999999",
96+
"/api/v1/todos/99999999",
9797
json={
9898
"title": "Delete test todo",
9999
"description": "Delete test todo description",

0 commit comments

Comments
 (0)