Get a BaseList bound to a fake document instance
(dict_items)
| 25 | class TestBaseDict: |
| 26 | @staticmethod |
| 27 | def _get_basedict(dict_items): |
| 28 | """Get a BaseList bound to a fake document instance""" |
| 29 | fake_doc = DocumentStub() |
| 30 | base_list = BaseDict(dict_items, instance=None, name="my_name") |
| 31 | base_list._instance = ( |
| 32 | fake_doc # hack to inject the mock, it does not work in the constructor |
| 33 | ) |
| 34 | return base_list |
| 35 | |
| 36 | def test___init___(self): |
| 37 | class MyDoc(Document): |
no test coverage detected