def test_filter_without_shard_key(self): with self.assertRaises(ProgrammingError): list(OneModel.objects.all())