'Ensure that a query returns a valid set of results.'

def test_find(self):

    user_a = self.Person.objects.create(name='User    A', age=20)
    user_b = self.Person.objects.create(name='User    B', age=30)
    people = self.Person.objects
    self.assertEqual(people.count(), 2)
    results = list(people)
    self.assertTrue(isinstance(results[0], self.Person))
    self.assertTrue(isinstance(results[0].id, (ObjectId, str, unicode)))
    self.assertEqual(results[0], user_a)
    self.assertEqual(results[0].name, 'User    A')
    self.assertEqual(results[0].age, 20)
    self.assertEqual(results[1], user_b)
    self.assertEqual(results[1].name, 'User    B')
    self.assertEqual(results[1].age, 30)
    people = self.Person.objects(age=20)
    self.assertEqual(people.count(), 1)
    person = people.next()
    self.assertEqual(person, user_a)
    self.assertEqual(person.name, 'User    A')
    self.assertEqual(person.age, 20)
