Skip to content

Commit

Permalink
1. Changed version
Browse files Browse the repository at this point in the history
2. Minor refactoring
  • Loading branch information
M1ha-Shvn committed Sep 8, 2020
1 parent 8e59f05 commit 897d699
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 4 additions & 2 deletions tests/test_hll_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -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;"
Expand Down

0 comments on commit 897d699

Please sign in to comment.