Instances with deferred fields look the same as normal instances when we examine attribute values. Therefore, this method returns the number of deferred fields on returned instances.
(self, obj, num)
| 18 | |
| 19 | class AssertionMixin: |
| 20 | def assert_delayed(self, obj, num): |
| 21 | """ |
| 22 | Instances with deferred fields look the same as normal instances when |
| 23 | we examine attribute values. Therefore, this method returns the number |
| 24 | of deferred fields on returned instances. |
| 25 | """ |
| 26 | count = len(obj.get_deferred_fields()) |
| 27 | self.assertEqual(count, num) |
| 28 | |
| 29 | |
| 30 | class DeferTests(AssertionMixin, TestCase): |
no test coverage detected