parent
42aa1af225
commit
620ad91996
|
@ -2,8 +2,12 @@ from unittest import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
from django.core.urlresolvers import reverse
|
||||||
|
|
||||||
from taiga.projects.tasks import services
|
from taiga.projects.tasks import services
|
||||||
|
|
||||||
|
from .. import factories as f
|
||||||
|
|
||||||
pytestmark = pytest.mark.django_db
|
pytestmark = pytest.mark.django_db
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,3 +32,14 @@ Task #2
|
||||||
tasks = services.create_tasks_in_bulk(data)
|
tasks = services.create_tasks_in_bulk(data)
|
||||||
|
|
||||||
db.save_in_bulk.assert_called_once_with(tasks, None)
|
db.save_in_bulk.assert_called_once_with(tasks, None)
|
||||||
|
|
||||||
|
|
||||||
|
def test_api_update_task_tags(client):
|
||||||
|
task = f.create_task()
|
||||||
|
url = reverse("tasks-detail", kwargs={"pk": task.pk})
|
||||||
|
data = {"tags": ["back", "front"], "version": task.version}
|
||||||
|
|
||||||
|
client.login(task.owner)
|
||||||
|
response = client.json.patch(url, data)
|
||||||
|
|
||||||
|
assert response.status_code == 200, response.data
|
||||||
|
|
Loading…
Reference in New Issue