Make send_naughty_tx error regex more robust

Signed-off-by: David Dashyan <mail@davie.li>
This commit is contained in:
David Dashyan 2020-05-28 23:42:32 +03:00
parent 7f30c658a0
commit d0f0b87e15
No known key found for this signature in database
GPG Key ID: 5D619778FD611992

View File

@ -68,8 +68,9 @@ def send_naughty_tx(asset, metadata):
error = sent_transaction.error
regex = (
r'\{\s*\n*'
r'\s*"message": "Invalid transaction \(ValidationError\): Invalid key name.*The key name cannot contain characters.*\n*' # noqa
r'\s*"status": 400\n*'
r'\s*"message":\s*"Invalid transaction \(ValidationError\):\s*'
r'Invalid key name.*The key name cannot contain characters.*\n*'
r'\s*"status":\s*400\n*'
r'\s*\}\n*')
assert status_code == 400
assert re.fullmatch(regex, error), sent_transaction