'Ensure that Doc.objects.get doesn\'t use any ordering.'

def test_no_ordering_for_get(self):

    class BlogPost(Document, ):
        title = StringField()
        published_date = DateTimeField()
        meta = {'ordering': ['-published_date']}
    BlogPost.objects.create(title='whatever', published_date=datetime.datetime.utcnow())
    with db_ops_tracker() as q:
        BlogPost.objects.get(title='whatever')
        self.assertEqual(len(q.get_ops()), 1)
        self.assertFalse(('$orderby' in q.get_ops()[0]['query']))
    with db_ops_tracker() as q:
        BlogPost.objects.order_by('-title').get(title='whatever')
        self.assertEqual(len(q.get_ops()), 1)
        self.assertFalse(('$orderby' in q.get_ops()[0]['query']))
