def test_hook_manager_should_return_named_extensions():
    hook1 = Extension('captain', None, None, None)
    hook2 = Extension('captain', None, None, None)

    em = HookManager.make_test_instance([hook1, hook2])

    assert [hook1, hook2] == em['captain']
def test_hook_manager_should_return_named_extensions():
    hook1 = Extension('captain', None, None, None)
    hook2 = Extension('captain', None, None, None)

    em = HookManager.make_test_instance([hook1, hook2])

    assert [hook1, hook2] == em['captain']
Пример #3
0
 def test_hook_manager_should_have_default_namespace(self):
     em = HookManager.make_test_instance([test_extension])
     self.assertEqual(em.namespace, 'TESTING')
Пример #4
0
 def test_hook_manager_should_be_first_extension_name(self):
     extensions = [test_extension, test_extension2]
     em = HookManager.make_test_instance(extensions)
     # This will raise KeyError if the names don't match
     assert (em[test_extension.name])
Пример #5
0
 def test_hook_manager_should_use_supplied_extensions(self):
     extensions = [test_extension, test_extension2]
     em = HookManager.make_test_instance(extensions)
     self.assertEqual(extensions, em.extensions)
Пример #6
0
 def test_hook_manager_should_return_named_extensions(self):
     hook1 = Extension('captain', None, None, None)
     hook2 = Extension('captain', None, None, None)
     em = HookManager.make_test_instance([hook1, hook2])
     self.assertEqual([hook1, hook2], em['captain'])
Пример #7
0
 def test_hook_manager_should_use_supplied_namespace(self):
     namespace = 'testing.1.2.3'
     em = HookManager.make_test_instance([test_extension],
                                         namespace=namespace)
     self.assertEqual(namespace, em.namespace)
Пример #8
0
 def test_hook_manager_should_have_default_namespace(self):
     em = HookManager.make_test_instance([test_extension])
     self.assertEqual(em.namespace, 'TESTING')
def test_hook_manager_should_have_default_namespace():
    em = HookManager.make_test_instance([test_extension])

    assert em.namespace
Пример #10
0
 def test_hook_manager_should_use_supplied_extensions(self):
     extensions = [test_extension, test_extension2]
     em = HookManager.make_test_instance(extensions)
     self.assertEqual(extensions, em.extensions)
def test_hook_manager_should_use_supplied_namespace():
    namespace = 'testing.1.2.3'
    em = HookManager.make_test_instance([test_extension], namespace=namespace)

    assert namespace == em.namespace
def test_hook_manager_should_have_default_namespace():
    em = HookManager.make_test_instance([test_extension])

    assert em.namespace
def test_hook_manager_should_use_supplied_extensions():
    extensions = [test_extension, test_extension2]
    em = HookManager.make_test_instance(extensions)

    assert extensions == em.extensions
Пример #14
0
def test_hook_manager_should_use_supplied_namespace():
    namespace = 'testing.1.2.3'
    em = HookManager.make_test_instance([test_extension], namespace=namespace)

    assert namespace == em.namespace
Пример #15
0
 def test_hook_manager_should_use_supplied_namespace(self):
     namespace = 'testing.1.2.3'
     em = HookManager.make_test_instance([test_extension],
                                         namespace=namespace)
     self.assertEqual(namespace, em.namespace)
Пример #16
0
 def test_hook_manager_should_be_first_extension_name(self):
     extensions = [test_extension, test_extension2]
     em = HookManager.make_test_instance(extensions)
     # This will raise KeyError if the names don't match
     assert(em[test_extension.name])
Пример #17
0
 def test_hook_manager_should_return_named_extensions(self):
     hook1 = Extension('captain', None, None, None)
     hook2 = Extension('captain', None, None, None)
     em = HookManager.make_test_instance([hook1, hook2])
     self.assertEqual([hook1, hook2], em['captain'])
Пример #18
0
def test_hook_manager_should_use_supplied_extensions():
    extensions = [test_extension, test_extension2]
    em = HookManager.make_test_instance(extensions)

    assert extensions == em.extensions