From ff580d73d8e65e86f6f5529f4028424273bc096b Mon Sep 17 00:00:00 2001 From: olliemath Date: Fri, 30 Jul 2021 09:33:28 +0100 Subject: [PATCH] Chore: organize tests --- tests/fields/__init__.py | 0 tests/{ => fields}/test_alias_fields.py | 6 +++--- tests/{ => fields}/test_array_fields.py | 0 tests/{ => fields}/test_compressed_fields.py | 0 tests/{ => fields}/test_custom_fields.py | 0 tests/{ => fields}/test_datetime_fields.py | 0 tests/{ => fields}/test_decimal_fields.py | 0 tests/{ => fields}/test_enum_fields.py | 0 tests/{ => fields}/test_fixed_string_fields.py | 0 tests/{ => fields}/test_ip_fields.py | 0 tests/{ => fields}/test_materialized_fields.py | 0 tests/{ => fields}/test_nullable_fields.py | 0 tests/{ => fields}/test_simple_fields.py | 0 tests/{ => fields}/test_uuid_fields.py | 0 14 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 tests/fields/__init__.py rename tests/{ => fields}/test_alias_fields.py (94%) rename tests/{ => fields}/test_array_fields.py (100%) rename tests/{ => fields}/test_compressed_fields.py (100%) rename tests/{ => fields}/test_custom_fields.py (100%) rename tests/{ => fields}/test_datetime_fields.py (100%) rename tests/{ => fields}/test_decimal_fields.py (100%) rename tests/{ => fields}/test_enum_fields.py (100%) rename tests/{ => fields}/test_fixed_string_fields.py (100%) rename tests/{ => fields}/test_ip_fields.py (100%) rename tests/{ => fields}/test_materialized_fields.py (100%) rename tests/{ => fields}/test_nullable_fields.py (100%) rename tests/{ => fields}/test_simple_fields.py (100%) rename tests/{ => fields}/test_uuid_fields.py (100%) diff --git a/tests/fields/__init__.py b/tests/fields/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_alias_fields.py b/tests/fields/test_alias_fields.py similarity index 94% rename from tests/test_alias_fields.py rename to tests/fields/test_alias_fields.py index 5b77513..4f800db 100644 --- a/tests/test_alias_fields.py +++ b/tests/fields/test_alias_fields.py @@ -2,8 +2,8 @@ import unittest from datetime import date from clickhouse_orm.database import Database -from clickhouse_orm.engines import * -from clickhouse_orm.fields import * +from clickhouse_orm.engines import MergeTree +from clickhouse_orm.fields import DateField, Int32Field, StringField from clickhouse_orm.funcs import F from clickhouse_orm.models import NO_VALUE, Model @@ -67,7 +67,7 @@ class ModelWithAliasFields(Model): date_field = DateField() str_field = StringField() - alias_str = StringField(alias=u"str_field") + alias_str = StringField(alias="str_field") alias_int = Int32Field(alias="int_field") alias_date = DateField(alias="date_field") alias_func = Int32Field(alias=F.toYYYYMM(date_field)) diff --git a/tests/test_array_fields.py b/tests/fields/test_array_fields.py similarity index 100% rename from tests/test_array_fields.py rename to tests/fields/test_array_fields.py diff --git a/tests/test_compressed_fields.py b/tests/fields/test_compressed_fields.py similarity index 100% rename from tests/test_compressed_fields.py rename to tests/fields/test_compressed_fields.py diff --git a/tests/test_custom_fields.py b/tests/fields/test_custom_fields.py similarity index 100% rename from tests/test_custom_fields.py rename to tests/fields/test_custom_fields.py diff --git a/tests/test_datetime_fields.py b/tests/fields/test_datetime_fields.py similarity index 100% rename from tests/test_datetime_fields.py rename to tests/fields/test_datetime_fields.py diff --git a/tests/test_decimal_fields.py b/tests/fields/test_decimal_fields.py similarity index 100% rename from tests/test_decimal_fields.py rename to tests/fields/test_decimal_fields.py diff --git a/tests/test_enum_fields.py b/tests/fields/test_enum_fields.py similarity index 100% rename from tests/test_enum_fields.py rename to tests/fields/test_enum_fields.py diff --git a/tests/test_fixed_string_fields.py b/tests/fields/test_fixed_string_fields.py similarity index 100% rename from tests/test_fixed_string_fields.py rename to tests/fields/test_fixed_string_fields.py diff --git a/tests/test_ip_fields.py b/tests/fields/test_ip_fields.py similarity index 100% rename from tests/test_ip_fields.py rename to tests/fields/test_ip_fields.py diff --git a/tests/test_materialized_fields.py b/tests/fields/test_materialized_fields.py similarity index 100% rename from tests/test_materialized_fields.py rename to tests/fields/test_materialized_fields.py diff --git a/tests/test_nullable_fields.py b/tests/fields/test_nullable_fields.py similarity index 100% rename from tests/test_nullable_fields.py rename to tests/fields/test_nullable_fields.py diff --git a/tests/test_simple_fields.py b/tests/fields/test_simple_fields.py similarity index 100% rename from tests/test_simple_fields.py rename to tests/fields/test_simple_fields.py diff --git a/tests/test_uuid_fields.py b/tests/fields/test_uuid_fields.py similarity index 100% rename from tests/test_uuid_fields.py rename to tests/fields/test_uuid_fields.py