Project

Profile

Help

Issue #468

closed

Add non existent user to a role should return 400

Added by ipanova@redhat.com about 9 years ago. Updated almost 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.4 Beta
Platform Release:
2.6.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Description of problem:
http://pulp-dev-guide.readthedocs.org/en/latest/integration/rest-api/role/cud.html#add-a-user-to-a-role

FAIL: test_08_add_unexistant_user (tests.test_06_roles.SimpleRoleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/user/myprojects/pulp-automation/tests/test_06_roles.py", line 108, in test_08_add_unexistant_user
self.assertPulp(code=400)
File "/home/user/myprojects/pulp-automation/tests/pulp_test.py", line 57, in assertPulp
code
File "/home/ipanova/myprojects/pulp-automation/tests/pulp_test.py", line 66, in assertEqual
super(PulpTest, self).assertEqual(a, b, pprint.pformat("%r != %r" % (a, b)))
AssertionError: '404 != 400'
-------------------- >> begin captured logging << --------------------
urllib3.connectionpool: DEBUG: "POST /pulp/api/v2/roles/SimpleRoleTest_role/users/ HTTP/1.1" 404 439
pulp_auto.pulp: DEBUG: <pulp_auto.pulp.Pulp object at 0x19dd4d0>.send(Request('POST', u'/roles/SimpleRoleTest_role/users/', data='{"login": "Unexistant_user"}', headers={'Content-Type': 'application/json'})) == <Response [404]>

Version-Release number of selected component (if applicable):
2.4.0-0.23.beta

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:
404 code is returned

Expected results:
400 code is returned

Additional info:

+ This bug was cloned from Bugzilla Bug #1116825 +

Also available in: Atom PDF