Skip to content

Commit

Permalink
Move test related to file remote from pulpcore
Browse files Browse the repository at this point in the history
Move test related to pulp_file remote from pulpcore.

See: pulp/pulp-smash#1085

'[noissue]'
  • Loading branch information
koliveir authored and rochacbruno committed May 21, 2019
1 parent 4fc5a35 commit 25b72f8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pulp_file/tests/functional/api/test_crud_remotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,21 @@ def test_05_delete(self):
with self.assertRaises(HTTPError):
self.client.get(self.remote['_href'])

def test_negative_create_file_remote_with_invalid_parameter(self):
"""Attempt to create file remote passing invalid parameter.
Assert response returns an error 400 including ["Unexpected field"].
This test targets the following issue:
* `Pulp Smash #1085 <https://github.com/PulpQE/pulp-smash/issues/1085>`_
"""
response = api.Client(self.cfg, api.echo_handler).post(
FILE_REMOTE_PATH, gen_file_remote(foo='bar')
)
assert response.status_code == 400
assert response.json()['foo'] == ['Unexpected field']


class CreateRemoteNoURLTestCase(unittest.TestCase):
"""Verify whether is possible to create a remote without a URL."""
Expand Down

0 comments on commit 25b72f8

Please sign in to comment.