mirror of
https://github.com/bendtherules/pytest_gui_status.git
synced 2026-08-18 13:42:26 +00:00
Use str(error) instead of error.message for py3 compat
This commit is contained in:
@@ -61,7 +61,7 @@ def test_redis_fail_1(tmpdir):
|
||||
with pytest.raises(redis.exceptions.ConnectionError) as error_info:
|
||||
gui_backend.Controller(fake_app_gui).redraw()
|
||||
|
||||
assert error_info.value.message == "Cant connect to this socket. Is redis running?\n" \
|
||||
assert str(error_info.value) == "Cant connect to this socket. Is redis running?\n" \
|
||||
+ "Stopping pytest_status_gui"
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ def test_redis_fail_2(tmpdir, redis_master):
|
||||
with pytest.raises(redis.exceptions.ConnectionError) as error_info:
|
||||
gui_backend.Controller(fake_app_gui).redraw()
|
||||
|
||||
assert error_info.value.message == "Redis is running on this port, but it is not related to pytest status\n"\
|
||||
assert str(error_info.value) == "Redis is running on this port, but it is not related to pytest status\n"\
|
||||
+ "Stopping pytest_status_gui"
|
||||
|
||||
fake_app_gui.stop.assert_called_with()
|
||||
@@ -118,7 +118,7 @@ def test_redis_fail_3(tmpdir, redis_master):
|
||||
with pytest.raises(redis.exceptions.ConnectionError) as error_info:
|
||||
gui_backend.Controller(fake_app_gui).redraw()
|
||||
|
||||
assert error_info.value.message == "Redis is running on this port, but it is not related to pytest status\n"\
|
||||
assert str(error_info.value) == "Redis is running on this port, but it is not related to pytest status\n"\
|
||||
+ "Stopping pytest_status_gui"
|
||||
|
||||
fake_app_gui.stop.assert_called_with()
|
||||
@@ -148,7 +148,7 @@ def test_redis_fail_4(tmpdir, redis_master):
|
||||
with pytest.raises(redis.exceptions.ConnectionError) as error_info:
|
||||
gui_backend.Controller(fake_app_gui).redraw()
|
||||
|
||||
assert error_info.value.message == "dir_name = {dir_name} not found in redis db".format(
|
||||
assert str(error_info.value) == "dir_name = {dir_name} not found in redis db".format(
|
||||
dir_name=fake_app_gui.dir_name)
|
||||
|
||||
fake_app_gui.stop.assert_called_with()
|
||||
|
||||
Reference in New Issue
Block a user