Fix backend module dispatch error tests broken from renaming

This commit is contained in:
Brett Sun 2016-12-06 14:28:53 +01:00 committed by Sylvain Bellemare
parent 2657226573
commit 8caeed54bf

View File

@ -45,11 +45,11 @@ def test_module_dispatch_dispatches(mock_module):
def test_module_dispatch_errors_on_missing_func(mock_module): def test_module_dispatch_errors_on_missing_func(mock_module):
from bigchaindb.backend.utils import ( from bigchaindb.backend.utils import (
module_dispatch_registrar, module_dispatch_registrar,
BackendModuleDispatchRegisterError, ModuleDispatchRegistrationError,
) )
mock_dispatch = module_dispatch_registrar(mock_module) mock_dispatch = module_dispatch_registrar(mock_module)
with pytest.raises(BackendModuleDispatchRegisterError): with pytest.raises(ModuleDispatchRegistrationError):
@mock_dispatch(str) @mock_dispatch(str)
def dispatched(): def dispatched():
pass pass
@ -58,7 +58,7 @@ def test_module_dispatch_errors_on_missing_func(mock_module):
def test_module_dispatch_errors_on_non_dispatchable_func(mock_module): def test_module_dispatch_errors_on_non_dispatchable_func(mock_module):
from bigchaindb.backend.utils import ( from bigchaindb.backend.utils import (
module_dispatch_registrar, module_dispatch_registrar,
BackendModuleDispatchRegisterError, ModuleDispatchRegistrationError,
) )
def dispatcher(): def dispatcher():
@ -66,7 +66,7 @@ def test_module_dispatch_errors_on_non_dispatchable_func(mock_module):
mock_module.dispatched = dispatcher mock_module.dispatched = dispatcher
mock_dispatch = module_dispatch_registrar(mock_module) mock_dispatch = module_dispatch_registrar(mock_module)
with pytest.raises(BackendModuleDispatchRegisterError): with pytest.raises(ModuleDispatchRegistrationError):
@mock_dispatch(str) @mock_dispatch(str)
def dispatched(): def dispatched():
pass pass