Skip to content

Commit

Permalink
Rename url
Browse files Browse the repository at this point in the history
  • Loading branch information
jumasheff committed Aug 21, 2020
1 parent 084144c commit 49a29d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 5 additions & 5 deletions orchestra/tests/test_todos.py
Expand Up @@ -613,7 +613,7 @@ def setUp(self):
setup_models(self)
self.project = ProjectFactory()
self.step = StepFactory()
self.list_url = reverse('orchestra:todos:todo-new-list')
self.list_url = reverse('orchestra:todos:todo-api-list')
self.todo = TodoFactory(project=self.project)
self.todo_with_step = TodoFactory(project=self.project, step=self.step)

Expand All @@ -639,7 +639,7 @@ def test_bulk_create(self):

def test_get_single_todo_by_pk(self):
detail_url = reverse(
'orchestra:todos:todo-new-detail',
'orchestra:todos:todo-api-detail',
kwargs={'pk': self.todo.id})
resp = self.request_client.get(detail_url)
self.assertEqual(resp.status_code, 200)
Expand Down Expand Up @@ -672,7 +672,7 @@ def test_update_functionality(self):
# Set title of the todo2 to todo1
serialized = BulkTodoSerializer(todo2).data
detail_url = reverse(
'orchestra:todos:todo-new-detail',
'orchestra:todos:todo-api-detail',
kwargs={'pk': todo1.id})
resp = self.request_client.put(
detail_url,
Expand All @@ -686,7 +686,7 @@ def test_update_functionality(self):

def test_partial_update_functionality(self):
detail_url = reverse(
'orchestra:todos:todo-new-detail',
'orchestra:todos:todo-api-detail',
kwargs={'pk': self.todo.id})
expected_title = 'Partial update title'
resp = self.request_client.patch(
Expand All @@ -700,7 +700,7 @@ def test_destroy_functionality(self):
all_todos_count = Todo.objects.count()
self.assertEqual(all_todos_count, 2)
detail_url = reverse(
'orchestra:todos:todo-new-detail',
'orchestra:todos:todo-api-detail',
kwargs={'pk': self.todo.id})
resp = self.request_client.delete(detail_url)
self.assertEqual(resp.status_code, 204)
Expand Down
3 changes: 1 addition & 2 deletions orchestra/todos/urls.py
Expand Up @@ -33,9 +33,8 @@
]

router = routers.SimpleRouter()
# TODO(murat): rename URL
router.register(
r'todo-new', views.TodoListViewset, basename='todo-new'
r'todo-api', views.TodoListViewset, basename='todo-api'
)

urlpatterns += router.urls

0 comments on commit 49a29d1

Please sign in to comment.