Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
praiskup committed Aug 2, 2023
1 parent 01f6400 commit 49b7a68
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,23 @@
from resallocserver import models
from resallocserver.app import session_scope
from resallocserver.main import Synchronizer
from resallocserver.manager import Manager, CrossPoolConfig
from resallocserver.manager import Manager, CrossPoolConfig, normalize_tags

from tests import ResallocTestCase


def test_normalize_tags():
""" Test that the normalize_tag() properly modifies the tags """
tags = ["a"]
normalize_tags(tags)
assert tags == [{"name": "a", "priority": 0}]
tags = ["a", {"name": "b"}, {"name": "c", "priority": 10}]
normalize_tags(tags)
assert tags == [{"name": "a", "priority": 0},
{"name": "b", "priority": 0},
{"name": "c", "priority": 10}]


class TestManager(ResallocTestCase):

@pytest.mark.parametrize(
Expand Down

0 comments on commit 49b7a68

Please sign in to comment.