Skip to content
Snippets Groups Projects
Commit 7872ef7e authored by Dan Notestein's avatar Dan Notestein
Browse files

Merge branch 'bw_mock_production_failure' into 'develop'

Mocks should not impact production flow if no data is loaded.

See merge request !428
parents 44d8b770 4a7b72d5
No related branches found
No related tags found
2 merge requests!456Release candidate v1 24,!428Mocks should not impact production flow if no data is loaded.
......@@ -50,6 +50,9 @@ class MockBlockProvider(MockDataProvider):
@classmethod
def get_block_data(cls, block_num, make_on_empty=False):
if len(cls.block_data) == 0:
return None
data = cls.block_data.get(block_num, None)
#if data is not None:
......@@ -57,8 +60,7 @@ class MockBlockProvider(MockDataProvider):
if make_on_empty and data is None:
data = cls.make_empty_block(block_num)
if data is None:
raise MockDataProviderException("No more blocks to serve")
return data
@classmethod
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment