'Check that chained field transforms are correctly resolved.
eg, a \'date__year__gte\' lookup on an article\'s \'published\' timestamp.'

@unittest.skipIf((django.VERSION < (1, 9)), 'version    does    not    support    transformed    lookup    expressions')
def test_resolve_transformed_lookups(self):

    model_field = Article._meta.get_field('published')
    standard_lookups = ['exact', 'iexact', 'gte', 'gt', 'lte', 'lt']
    date_lookups = ['year', 'month', 'day', 'week_day']
    datetime_lookups = (date_lookups + ['hour', 'minute', 'second'])
    for lookup in standard_lookups:
        (field, resolved_lookup) = resolve_field(model_field, LOOKUP_SEP.join(['date', lookup]))
        self.assertIsInstance(field, models.DateField)
        self.assertEqual(resolved_lookup, lookup)
    for part in datetime_lookups:
        for lookup in standard_lookups:
            (field, resolved_lookup) = resolve_field(model_field, LOOKUP_SEP.join([part, lookup]))
            self.assertIsInstance(field, models.IntegerField)
            self.assertEqual(resolved_lookup, lookup)
    for part in date_lookups:
        for lookup in standard_lookups:
            (field, resolved_lookup) = resolve_field(model_field, LOOKUP_SEP.join(['date', part, lookup]))
            self.assertIsInstance(field, models.IntegerField)
            self.assertEqual(resolved_lookup, lookup)
