From 897d699b48cbfec357b7bda251a2bb16c201d1c5 Mon Sep 17 00:00:00 2001 From: M1ha-Shvn Date: Tue, 8 Sep 2020 19:28:24 +0500 Subject: [PATCH] 1. Changed version 2. Minor refactoring --- setup.py | 2 +- tests/test_hll_field.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index abbcb51..bc43488 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setup( name='django-pg-hll', - version='1.2.0', + version='1.2.1', packages=['django_pg_hll'], package_dir={'': 'src'}, url='https://github.com/M1hacka/django-pg-hll', diff --git a/tests/test_hll_field.py b/tests/test_hll_field.py index c614e09..6322378 100644 --- a/tests/test_hll_field.py +++ b/tests/test_hll_field.py @@ -41,12 +41,14 @@ def test_create(self): TestModel.objects.create(hll_field=HllEmpty()) def test_create_custom_params(self): + # HACK This test is hacky as HllEmpty parameters are not implemented and should be fixed. + # See https://github.com/M1ha-Shvn/django-pg-hll/issues/8 with connection.cursor() as cursor: - cursor.execute('select hll_set_defaults(13,2,1,0);') + cursor.execute('select hll_set_defaults(13, 2, 1, 0);') try: TestConfiguredModel.objects.create(hll_field=HllEmpty()) finally: - cursor.execute('select hll_set_defaults(11,5,-1,1);') + cursor.execute('select hll_set_defaults(11, 5, -1, 1);') def test_migration(self): query = "SELECT hll_cardinality(hll_field) FROM tests_testmodel;"