Skip to content

Commit a2eb754

Browse files
author
Bojan Jovanovic
committed
Fixed tests
1 parent 0406ac2 commit a2eb754

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pyconbalkan/cfp/tests.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
from django.contrib.auth.models import User
22
from rest_framework import status
33
from rest_framework.test import APITestCase
4+
from . import const
45

5-
from .models import Cfp, TALK
6+
from .models import Cfp
67

78
CFP_URL = '/api/cfp/'
89

@@ -18,7 +19,7 @@ def setUp(self):
1819
title='Test',
1920
duration='30min',
2021
description='Test',
21-
type=TALK
22+
type=const.TALK
2223
)
2324

2425
# Create user
@@ -39,7 +40,7 @@ def test_create_returns_error_for_unauthenticated_user(self):
3940
'title': 'Test1',
4041
'duration': 'Test1',
4142
'description': 'Test',
42-
'type': TALK,
43+
'type': const.TALK,
4344
})
4445
self.assertEqual(status.HTTP_403_FORBIDDEN, result.status_code, 'Status code should be 403 for list.')
4546

@@ -78,7 +79,7 @@ def test_create_returns_success_for_authenticated_user(self):
7879
'title': 'Test1',
7980
'duration': 'Test1',
8081
'description': 'Test',
81-
'type': TALK,
82+
'type': const.TALK,
8283
})
8384
self.assertEqual(status.HTTP_201_CREATED, result.status_code, 'Status code should be 201 for create.')
8485

0 commit comments

Comments
 (0)