refactored lists to have more descriptive urlpatterns; cascading changes across API, dashboard app & even FTs; restarted staging server db w. new migrations
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -20,7 +20,7 @@ class ListDetailAPITest(BaseAPITest):
|
||||
response = self.client.get(f"/api/lists/{list_.id}/")
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(response.data["id"], list_.id)
|
||||
self.assertEqual(response.data["id"], str(list_.id))
|
||||
self.assertEqual(len(response.data["items"]), 2)
|
||||
|
||||
class ListItemsAPITest(BaseAPITest):
|
||||
@@ -48,7 +48,7 @@ class ListsAPITest(BaseAPITest):
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(len(response.data), 1)
|
||||
self.assertEqual(response.data[0]["id"], list1.id)
|
||||
self.assertEqual(response.data[0]["id"], str(list1.id))
|
||||
|
||||
def test_post_creates_list_with_item(self):
|
||||
response = self.client.post(
|
||||
|
||||
@@ -5,7 +5,7 @@ from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.ListsAPI.as_view(), name='api_lists'),
|
||||
path('<int:list_id>/', views.ListDetailAPI.as_view(), name='api_list_detail'),
|
||||
path('<int:list_id>/items/', views.ListItemsAPI.as_view(), name='api_list_items'),
|
||||
path('<uuid:list_id>/', views.ListDetailAPI.as_view(), name='api_list_detail'),
|
||||
path('<uuid:list_id>/items/', views.ListItemsAPI.as_view(), name='api_list_items'),
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user