From 4ffc27100dabeb1551471278b809fe455c33ea00 Mon Sep 17 00:00:00 2001 From: Itai Shirav Date: Sat, 8 Feb 2020 12:12:42 +0200 Subject: [PATCH] Support for function-based DEFAULT values, not only literals #36 --- tests/test_compressed_fields.py | 4 ++-- tests/test_models.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_compressed_fields.py b/tests/test_compressed_fields.py index 5bb3282..3de5d22 100644 --- a/tests/test_compressed_fields.py +++ b/tests/test_compressed_fields.py @@ -4,7 +4,7 @@ import datetime import pytz from infi.clickhouse_orm.database import Database -from infi.clickhouse_orm.models import Model +from infi.clickhouse_orm.models import Model, NO_VALUE from infi.clickhouse_orm.fields import * from infi.clickhouse_orm.engines import * from infi.clickhouse_orm.utils import parse_tsv @@ -67,7 +67,7 @@ class CompressedFieldsTestCase(unittest.TestCase): "int64_field": 100, "float_field": 7.0, "datetime_field": datetime.datetime(1970, 1, 1, 0, 0, 0, tzinfo=pytz.utc), - "alias_field": 0.0, + "alias_field": NO_VALUE, 'string_field': 'dozo', 'nullable_field': None, 'uint64_field': 0, diff --git a/tests/test_models.py b/tests/test_models.py index 3e1548a..33fb6a7 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -65,7 +65,7 @@ class ModelTestCase(unittest.TestCase): "int_field": 100, "float_field": 7.0, "datetime_field": datetime.datetime(1970, 1, 1, 0, 0, 0, tzinfo=pytz.utc), - "alias_field": 0.0, + "alias_field": NO_VALUE, "str_field": "dozo", "default_func": NO_VALUE })