You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, @cmagnobarbosa.
Issue 132 seems to be closed by PR 137, and in there, we referenced problems with some payloads.
The application continues failing in the case in which a payload specifies non-serializable JSON data.
some tests:
def test_030_install_flow_should_fail(self):
"""Test if the flow installation process specifying a
wrong datatype payload behaves as expected (400 Error)."""
payload = {
"flows": [
{
"priority"
}
]
}
api_url = KYTOS_API + '/flow_manager/v2/flows/00:00:00:00:00:00:00:01'
response = requests.post(api_url, data=json.dumps(payload),
headers={'Content-type': 'application/json'})
assert response.status_code == 400
def test_055_install_flows_should_fail(self):
"""Test if the flow installation process specifying a
wrong datatype payload behaves as expected (400 Error)."""
payload = {
"flows": [
{
"priority"
}
]
}
api_url = KYTOS_API + '/flow_manager/v2/flows'
response = requests.post(api_url, data=json.dumps(payload),
headers={'Content-type': 'application/json'})
assert response.status_code == 400
def test_080_delete_flow_should_fail(self):
"""Test if the flow deletion process specifying a
wrong datatype payload behaves as expected (400 Error)."""
payload = {
"flows": [
{
"priority"
}
]
}
# delete the flow
api_url = KYTOS_API + '/flow_manager/v2/flows/00:00:00:00:00:00:00:01'
response = requests.delete(api_url, data=json.dumps(payload),
headers={'Content-type': 'application/json'})
assert response.status_code == 400
def test_100_delete_flows_should_fail(self):
"""Test if the flow deletion process specifying a
wrong datatype payload behaves as expected (400 Error)."""
payload = {
"flows": [
{
"priority"
}
]
}
# delete the flow
api_url = KYTOS_API + '/flow_manager/v2/flows'
response = requests.delete(api_url, data=json.dumps(payload),
headers={'Content-type': 'application/json'})
assert response.status_code == 400
The text was updated successfully, but these errors were encountered:
@ArturoQuintana , what is the answer you are receiving? Your payload is really non-serializable, but as you try to serialize it prior to make the request, json.dumps call raises TypeError, so the call to kytos is never made.
To test this, you should try to pass the payload without serializing it first.
Original issue opened by @ArturoQuintana at kytos#138.
Hi, @cmagnobarbosa.
Issue 132 seems to be closed by PR 137, and in there, we referenced problems with some payloads.
The application continues failing in the case in which a payload specifies non-serializable JSON data.
some tests:
The text was updated successfully, but these errors were encountered: