Get a BaseList bound to a fake document instance
(list_items)
| 161 | class TestBaseList: |
| 162 | @staticmethod |
| 163 | def _get_baselist(list_items): |
| 164 | """Get a BaseList bound to a fake document instance""" |
| 165 | fake_doc = DocumentStub() |
| 166 | base_list = BaseList(list_items, instance=None, name="my_name") |
| 167 | base_list._instance = ( |
| 168 | fake_doc # hack to inject the mock, it does not work in the constructor |
| 169 | ) |
| 170 | return base_list |
| 171 | |
| 172 | def test___init___(self): |
| 173 | class MyDoc(Document): |
no test coverage detected