diff options
| author | Shyam Sunder | 2020-09-24 12:57:26 -0400 |
|---|---|---|
| committer | neobooru | 2020-09-24 19:09:54 +0200 |
| commit | d4f72de8c24e03e4f2420772af373ee7952e35c7 (patch) | |
| tree | 09b593cd33a31ba158bee7e9c3a3178963f48993 /server/szurubooru/tests/func | |
| parent | b5d2e447fc3f40050516e9ef9879ebe2008dd4d2 (diff) | |
server/tests: fix failing tests
Diffstat (limited to 'server/szurubooru/tests/func')
| -rw-r--r-- | server/szurubooru/tests/func/test_tag_categories.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/server/szurubooru/tests/func/test_tag_categories.py b/server/szurubooru/tests/func/test_tag_categories.py index e369068..11300cf 100644 --- a/server/szurubooru/tests/func/test_tag_categories.py +++ b/server/szurubooru/tests/func/test_tag_categories.py @@ -37,8 +37,8 @@ def test_serialize_category(tag_category_factory, tag_factory): def test_create_category_when_first(): with patch("szurubooru.func.tag_categories.update_category_name"), patch( "szurubooru.func.tag_categories.update_category_color" - ): - category = tag_categories.create_category("name", "color") + ), patch("szurubooru.func.tag_categories.update_category_order"): + category = tag_categories.create_category("name", "color", 7) assert category.default tag_categories.update_category_name.assert_called_once_with( category, "name" @@ -46,6 +46,9 @@ def test_create_category_when_first(): tag_categories.update_category_color.assert_called_once_with( category, "color" ) + tag_categories.update_category_order.assert_called_once_with( + category, 7 + ) def test_create_category_when_subsequent(tag_category_factory): @@ -53,8 +56,8 @@ def test_create_category_when_subsequent(tag_category_factory): db.session.flush() with patch("szurubooru.func.tag_categories.update_category_name"), patch( "szurubooru.func.tag_categories.update_category_color" - ): - category = tag_categories.create_category("name", "color") + ), patch("szurubooru.func.tag_categories.update_category_order"): + category = tag_categories.create_category("name", "color", 7) assert not category.default tag_categories.update_category_name.assert_called_once_with( category, "name" @@ -62,6 +65,9 @@ def test_create_category_when_subsequent(tag_category_factory): tag_categories.update_category_color.assert_called_once_with( category, "color" ) + tag_categories.update_category_order.assert_called_once_with( + category, 7 + ) def test_update_category_name_with_empty_string(tag_category_factory): |