Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jefer94 committed May 23, 2024
1 parent 070392e commit 15f49dd
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions breathecode/assignments/tests/urls/tests_user_me_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,36 +739,6 @@ def test_post__no_required_fields(client: capy.Client, database: capy.Database):
assert database.list_of('assignments.Task') == []


@pytest.mark.parametrize('task_type', [
'PROJECT',
'QUIZ',
'LESSON',
'EXERCISE',
])
def test_post__no_cohort(client: capy.Client, database: capy.Database, fake: capy.Fake, task_type: str):
url = reverse_lazy('assignments:user_me_task')

model = database.create(user=1)
client.force_authenticate(model.user)

data = {
'associated_slug': fake.slug(),
'title': fake.name(),
'task_type': task_type,
}
response = client.post(url, data, format='json')

json = response.json()
expected = {
'detail': 'Cohort is required.',
'status_code': 400,
}

assert json == expected
assert response.status_code == status.HTTP_400_BAD_REQUEST
assert database.list_of('assignments.Task') == []


@pytest.mark.parametrize('task_type', [
'PROJECT',
'QUIZ',
Expand Down

0 comments on commit 15f49dd

Please sign in to comment.