()
| 22 | def _assert_fully_loaded(self, users): |
| 23 | # verify everything loaded, with no additional sql needed |
| 24 | def go(): |
| 25 | # comparison with no additional sql |
| 26 | eq_(users, self.static.user_all_result) |
| 27 | # keywords are not part of self.static.user_all_result, so |
| 28 | # verify all the item keywords were loaded, with no more sql. |
| 29 | # 'any' verifies at least some items have keywords; we build |
| 30 | # a list for any([...]) instead of any(...) to prove we've |
| 31 | # iterated all the items with no sql. |
| 32 | f = util.flatten_iterator |
| 33 | assert any( |
| 34 | [ |
| 35 | i.keywords |
| 36 | for i in f([o.items for o in f([u.orders for u in users])]) |
| 37 | ] |
| 38 | ) |
| 39 | |
| 40 | self.assert_sql_count(testing.db, go, 0) |
| 41 |
nothing calls this directly
no test coverage detected