From c59d76b82795f39604fff708e70d0a8bffc9c3ce Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 17 Nov 2022 09:09:44 +0300 Subject: Tests: Make test failure messages clearer. --- tests/unit/auth/test_migrations_indexes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/unit/auth') diff --git a/tests/unit/auth/test_migrations_indexes.py b/tests/unit/auth/test_migrations_indexes.py index a346164..db0a7f3 100644 --- a/tests/unit/auth/test_migrations_indexes.py +++ b/tests/unit/auth/test_migrations_indexes.py @@ -47,11 +47,11 @@ def test_index_created(# pylint: disable=[too-many-arguments] rollback_migrations(backend, older_migrations + [the_migration]) assert the_index not in [row[0] for row in result_before_migration], ( - f"Index '{the_index}' was not found for table '{the_table}'.") + f"Index '{the_index}' was found for table '{the_table}' before migration.") assert ( len(result_after_migration) == 1 and result_after_migration[0][0] == the_index), ( - f"Index '{the_index}' was not found for table '{the_table}'.") + f"Index '{the_index}' was not found for table '{the_table}' after migration.") @pytest.mark.unit_test @pytest.mark.parametrize( @@ -86,7 +86,7 @@ def test_index_dropped(# pylint: disable=[too-many-arguments] assert ( len(result_after_migration) == 1 and result_after_migration[0][0] == the_index), ( - f"Index '{the_index}' was not found for table '{the_table}'.") + f"Index '{the_index}' was not found for table '{the_table}' after migration.") assert the_index not in [row[0] for row in result_after_rollback], ( f"Index '{the_index}' was found for table '{the_table}' after " "rollback") -- cgit v1.2.3