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']
 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_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])
 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_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'])
 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)
 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
 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
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_use_supplied_namespace(self):
     namespace = 'testing.1.2.3'
     em = HookManager.make_test_instance([test_extension],
                                         namespace=namespace)
     self.assertEqual(namespace, em.namespace)
 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])
 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'])
def test_hook_manager_should_use_supplied_extensions():
    extensions = [test_extension, test_extension2]
    em = HookManager.make_test_instance(extensions)

    assert extensions == em.extensions