Commit b70cab36 authored by Łukasz Nowak's avatar Łukasz Nowak

Cover a case when slave is not boolean.

parent 51229c44
......@@ -202,6 +202,33 @@ class TestVifibSlaposRestAPIV1(ERP5TypeTestCase):
self.json_response)
self.assertSimulatorEmpty()
def test_request_slave_not_bool(self):
kwargs = {
'parameter': {
'Custom1': 'one string',
'Custom2': 'one float',
'Custom3': ['abc', 'def']},
'title': 'My unique instance',
'software_release': 'http://example.com/example.cfg',
'status': 'started',
'sla': {
'computer_id': 'COMP-0'},
'software_type': 'type_provided_by_the_software',
'slave': "True"}
self.connection.request(method='POST',
url='/'.join([self.api_path, 'instance']),
body=json.dumps(kwargs),
headers={'REMOTE_USER': self.customer_reference})
self.prepareResponse()
self.assertBasicResponse()
self.assertResponseCode(400)
self.assertResponseJson()
self.assertEqual({
"slave": "Not boolean.",
},
self.json_response)
self.assertSimulatorEmpty()
def test_request_correct(self):
kwargs = {
'parameter': {
......
5
\ No newline at end of file
6
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment