diff --git a/tests/test_plugin/test_gui.py b/tests/test_plugin/test_gui.py index c48f407..c54c792 100644 --- a/tests/test_plugin/test_gui.py +++ b/tests/test_plugin/test_gui.py @@ -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()