From e97e48a695d9ac9e39edb764119aa6c598bf18d9 Mon Sep 17 00:00:00 2001 From: Itai Shirav Date: Thu, 28 May 2020 18:17:52 +0300 Subject: [PATCH] Fix test in for latest clickhouse version --- tests/test_database.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test_database.py b/tests/test_database.py index 15d928f..78c3fdb 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -275,5 +275,10 @@ class DatabaseTestCase(TestCaseWithData): self.assertTrue(model.is_read_only()) self.assertEqual(model.table_name(), row.name) # Read a few records - list(model.objects_in(self.database)[:10]) - + try: + list(model.objects_in(self.database)[:10]) + except ServerError as e: + if 'Not enough privileges' in e.message: + pass + else: + raise