(self)
| 90 | self.assertEqual(lookup.lhs.lhs.target, Author._meta.get_field("name")) |
| 91 | |
| 92 | def test_negated_nullable(self): |
| 93 | query = Query(Item) |
| 94 | where = query.build_where(~Q(modified__lt=datetime(2017, 1, 1))) |
| 95 | self.assertTrue(where.negated) |
| 96 | lookup = where.children[0] |
| 97 | self.assertIsInstance(lookup, LessThan) |
| 98 | self.assertEqual(lookup.lhs.target, Item._meta.get_field("modified")) |
| 99 | lookup = where.children[1] |
| 100 | self.assertIsInstance(lookup, IsNull) |
| 101 | self.assertEqual(lookup.lhs.target, Item._meta.get_field("modified")) |
| 102 | |
| 103 | def test_foreign_key(self): |
| 104 | query = Query(Item) |
nothing calls this directly
no test coverage detected