mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Fix backend module dispatch error tests broken from renaming
This commit is contained in:
parent
2657226573
commit
8caeed54bf
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user