'Tests that models can be saved and retrieved'

def test_clustering_order(self):

    items = list(range(20))
    random.shuffle(items)
    for i in items:
        TestModel.create(id=1, clustering_key=i)
    values = list(TestModel.objects.values_list('clustering_key', flat=True))
    self.assertEqual(values, sorted(items, reverse=True))
