'Check that lookups can be resolved for related fields
in the forwards direction.'

def test_resolve_forward_related_lookups(self):

    lookups = ['exact', 'gte', 'gt', 'lte', 'lt', 'in', 'isnull']
    model_field = Article._meta.get_field('author')
    for term in lookups:
        (field, lookup) = resolve_field(model_field, term)
        self.assertIsInstance(field, models.ForeignKey)
        self.assertEqual(lookup, term)
    model_field = User._meta.get_field('favorite_books')
    for term in lookups:
        (field, lookup) = resolve_field(model_field, term)
        self.assertIsInstance(field, models.ManyToManyField)
        self.assertEqual(lookup, term)
