'Tests that queries on an indexed field will work without any primary key relations specified'

@greaterthancass20
@execute_count(7)
def test_indexed_field_can_be_queried(self):

    q = IndexedTestModel.objects(test_result=25)
    self.assertEqual(q.count(), 4)
    q = IndexedCollectionsTestModel.objects.filter(test_list__contains=42)
    self.assertEqual(q.count(), 1)
    q = IndexedCollectionsTestModel.objects.filter(test_list__contains=13)
    self.assertEqual(q.count(), 0)
    q = IndexedCollectionsTestModel.objects.filter(test_set__contains=42)
    self.assertEqual(q.count(), 1)
    q = IndexedCollectionsTestModel.objects.filter(test_set__contains=13)
    self.assertEqual(q.count(), 0)
    q = IndexedCollectionsTestModel.objects.filter(test_map__contains=42)
    self.assertEqual(q.count(), 1)
    q = IndexedCollectionsTestModel.objects.filter(test_map__contains=13)
    self.assertEqual(q.count(), 0)
