mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-24 06:25:45 +00:00
blackified
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
parent
8d4f95cb82
commit
c83e0f2c96
@ -178,14 +178,14 @@ def test_post_create_transaction_with_invalid_id(mock_logger, b, client):
|
||||
assert res.status_code == expected_status_code
|
||||
assert res.json["message"] == expected_error_message
|
||||
# TODO change the loglevel to DEBUG for this test case to enable the following 3 asserts
|
||||
#assert mock_logger.error.called
|
||||
#assert "HTTP API error: %(status)s - %(method)s:%(path)s - %(message)s" in mock_logger.error.call_args[0]
|
||||
#assert {
|
||||
# assert mock_logger.error.called
|
||||
# assert "HTTP API error: %(status)s - %(method)s:%(path)s - %(message)s" in mock_logger.error.call_args[0]
|
||||
# assert {
|
||||
# "message": expected_error_message,
|
||||
# "status": expected_status_code,
|
||||
# "method": "POST",
|
||||
# "path": TX_ENDPOINT,
|
||||
#} in mock_logger.error.call_args[0]
|
||||
# } in mock_logger.error.call_args[0]
|
||||
# TODO put back caplog based asserts once possible
|
||||
# assert caplog.records[0].args['status'] == expected_status_code
|
||||
# assert caplog.records[0].args['message'] == expected_error_message
|
||||
@ -217,14 +217,14 @@ def test_post_create_transaction_with_invalid_signature(mock_logger, b, client):
|
||||
assert res.status_code == expected_status_code
|
||||
assert res.json["message"] == expected_error_message
|
||||
# TODO change the loglevel to DEBUG for this test case to enable the following 3 asserts
|
||||
#assert mock_logger.error.called
|
||||
#assert "HTTP API error: %(status)s - %(method)s:%(path)s - %(message)s" in mock_logger.error.call_args[0]
|
||||
#assert {
|
||||
# assert mock_logger.error.called
|
||||
# assert "HTTP API error: %(status)s - %(method)s:%(path)s - %(message)s" in mock_logger.error.call_args[0]
|
||||
# assert {
|
||||
# "message": expected_error_message,
|
||||
# "status": expected_status_code,
|
||||
# "method": "POST",
|
||||
# "path": TX_ENDPOINT,
|
||||
#} in mock_logger.error.call_args[0]
|
||||
# } in mock_logger.error.call_args[0]
|
||||
# TODO put back caplog based asserts once possible
|
||||
# assert caplog.records[0].args['status'] == expected_status_code
|
||||
# assert caplog.records[0].args['message'] == expected_error_message
|
||||
@ -268,14 +268,14 @@ def test_post_create_transaction_with_invalid_schema(mock_logger, client):
|
||||
assert res.status_code == expected_status_code
|
||||
assert res.json["message"] == expected_error_message
|
||||
# TODO change the loglevel to DEBUG for this test case to enable the following 3 asserts
|
||||
#assert mock_logger.error.called
|
||||
#assert "HTTP API error: %(status)s - %(method)s:%(path)s - %(message)s" in mock_logger.error.call_args[0]
|
||||
#assert {
|
||||
# assert mock_logger.error.called
|
||||
# assert "HTTP API error: %(status)s - %(method)s:%(path)s - %(message)s" in mock_logger.error.call_args[0]
|
||||
# assert {
|
||||
# "message": expected_error_message,
|
||||
# "status": expected_status_code,
|
||||
# "method": "POST",
|
||||
# "path": TX_ENDPOINT,
|
||||
#} in mock_logger.error.call_args[0]
|
||||
# } in mock_logger.error.call_args[0]
|
||||
# TODO put back caplog based asserts once possible
|
||||
# assert caplog.records[0].args['status'] == expected_status_code
|
||||
# assert caplog.records[0].args['message'] == expected_error_message
|
||||
@ -316,14 +316,14 @@ def test_post_invalid_transaction(
|
||||
assert res.status_code == expected_status_code
|
||||
assert res.json["message"] == "Invalid transaction ({}): {}".format(exc, msg)
|
||||
# TODO change the loglevel to DEBUG for this test case to enable the following 3 asserts
|
||||
#assert mock_logger.error.called
|
||||
#assert "HTTP API error: %(status)s - %(method)s:%(path)s - %(message)s" in mock_logger.error.call_args[0]
|
||||
#assert {
|
||||
# assert mock_logger.error.called
|
||||
# assert "HTTP API error: %(status)s - %(method)s:%(path)s - %(message)s" in mock_logger.error.call_args[0]
|
||||
# assert {
|
||||
# "message": expected_error_message,
|
||||
# "status": expected_status_code,
|
||||
# "method": "POST",
|
||||
# "path": TX_ENDPOINT,
|
||||
#} in mock_logger.error.call_args[0]
|
||||
# } in mock_logger.error.call_args[0]
|
||||
# TODO put back caplog based asserts once possible
|
||||
# assert caplog.records[2].args['status'] == expected_status_code
|
||||
# assert caplog.records[2].args['message'] == expected_error_message
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user