Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
campaign
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
La Quadrature du Net
piphone
campaign
Commits
1bf9ca37
Commit
1bf9ca37
authored
Feb 13, 2017
by
okhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing the test for the feedbacks
parent
a7b5ef8e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
picampaign/feedback/tests.py
picampaign/feedback/tests.py
+3
-2
No files found.
picampaign/feedback/tests.py
View file @
1bf9ca37
...
...
@@ -70,6 +70,7 @@ class FeedbackViewTest(APITestCase):
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
Feedback
.
objects
.
count
(),
1
)
self
.
assertEqual
(
Feedback
.
objects
.
get
().
comment
,
'Feedback'
)
# A category which does not exists should raise an error
data
=
{
'callee'
:
contact
.
id
,
'category'
:
1234567
,
'comment'
:
'Feedback'
}
with
self
.
assertRaises
(
Exception
):
self
.
client
.
post
(
'/campaigns/%(cid)d/feedbacks/'
%
{
'cid'
:
campaign
.
id
},
data
,
format
=
'json'
)
response
=
self
.
client
.
post
(
'/campaigns/%(cid)d/feedbacks/'
%
{
'cid'
:
campaign
.
id
},
data
,
format
=
'json'
)
assert
response
.
status_code
>=
400
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment