diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..1447eb4 --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1,11 @@ +TEST_HINTER = 'test-hinter' +HINTS_ALL = ('ALL') +DEFAULT_URGENCY = 'medium' + + +class MockObject(object): + + def __init__(self, **kwargs): + for key, value in kwargs.items(): + setattr(self, key, value) + diff --git a/tests/test_policy.py b/tests/test_policy.py index 2292ff3..a51b557 100644 --- a/tests/test_policy.py +++ b/tests/test_policy.py @@ -6,10 +6,9 @@ from britney2.excuse import Excuse from britney2.hints import HintParser from britney2.policies.policy import AgePolicy, RCBugPolicy, PiupartsPolicy, PolicyVerdict +from . import MockObject, TEST_HINTER, HINTS_ALL, DEFAULT_URGENCY + POLICY_DATA_BASE_DIR = os.path.join(os.path.dirname(__file__), 'policy-test-data') -TEST_HINTER = 'test-hinter' -HINTS_ALL = ('ALL') -DEFAULT_URGENCY = 'medium' def initialize_policy(test_name, policy_class, *args, **kwargs): @@ -52,13 +51,6 @@ def create_policy_objects(source_name, target_version, source_version): ) -class MockObject(object): - - def __init__(self, **kwargs): - for key, value in kwargs.items(): - setattr(self, key, value) - - class TestRCBugsPolicy(unittest.TestCase): def test_no_bugs(self):