From 75d5306bd32ed7101333600df986be620b9ec28e Mon Sep 17 00:00:00 2001 From: Subhash Bhushan Date: Mon, 16 Mar 2020 12:21:08 -0700 Subject: [PATCH] Tox changes in prep for next release --- src/protean/infra/event_log.py | 4 +++- tests/domain_event/elements.py | 2 +- tests/domain_event/tests.py | 2 +- tests/field/test_field_types.py | 2 +- tests/impl/model/dict_model/elements.py | 2 +- tests/impl/model/dict_model/tests.py | 4 ++-- tests/impl/model/elasticsearch_model/elements.py | 5 +++-- tests/impl/model/sqlalchemy_model/postgresql/elements.py | 3 +-- tests/impl/model/sqlalchemy_model/postgresql/test_model.py | 2 +- tests/impl/model/sqlalchemy_model/sqlite/elements.py | 3 +-- tests/impl/model/sqlalchemy_model/sqlite/test_model.py | 2 +- 11 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/protean/infra/event_log.py b/src/protean/infra/event_log.py index 7aa3e336..35c49b77 100644 --- a/src/protean/infra/event_log.py +++ b/src/protean/infra/event_log.py @@ -1,7 +1,9 @@ +# Standard Library Imports from datetime import datetime +# Protean from protean.core.aggregate import BaseAggregate -from protean.core.field.basic import String, DateTime, Dict +from protean.core.field.basic import DateTime, Dict, String from protean.core.repository.base import BaseRepository from protean.globals import current_domain diff --git a/tests/domain_event/elements.py b/tests/domain_event/elements.py index 99bce092..9a2bf7bf 100644 --- a/tests/domain_event/elements.py +++ b/tests/domain_event/elements.py @@ -5,8 +5,8 @@ from protean.core.domain_event import BaseDomainEvent from protean.core.field.basic import Integer, String from protean.core.field.embedded import AggregateField -from protean.globals import current_domain from protean.core.unit_of_work import UnitOfWork +from protean.globals import current_domain class PersonCommand(BaseCommand): diff --git a/tests/domain_event/tests.py b/tests/domain_event/tests.py index eb7b6880..129fb807 100644 --- a/tests/domain_event/tests.py +++ b/tests/domain_event/tests.py @@ -3,9 +3,9 @@ from mock import patch from protean.core.domain_event import BaseDomainEvent -from protean.infra.event_log import EventLog, EventLogRepository from protean.globals import current_domain from protean.impl.broker.memory_broker import MemoryBroker +from protean.infra.event_log import EventLog, EventLogRepository from protean.utils import fully_qualified_name # Local/Relative Imports diff --git a/tests/field/test_field_types.py b/tests/field/test_field_types.py index 80e722e7..39983717 100644 --- a/tests/field/test_field_types.py +++ b/tests/field/test_field_types.py @@ -8,9 +8,9 @@ # Protean import pytest +from protean.core.aggregate import BaseAggregate from protean.core.exceptions import ValidationError from protean.core.field.basic import Auto, Boolean, Date, DateTime, Dict, Float, Integer, List, String, Text -from protean.core.aggregate import BaseAggregate class TestStringField: diff --git a/tests/impl/model/dict_model/elements.py b/tests/impl/model/dict_model/elements.py index b0649de6..38e86a29 100644 --- a/tests/impl/model/dict_model/elements.py +++ b/tests/impl/model/dict_model/elements.py @@ -9,9 +9,9 @@ from protean.core.field.basic import Integer, String, Text from protean.core.field.embedded import ValueObjectField from protean.core.repository.base import BaseRepository +from protean.core.repository.model import BaseModel from protean.core.value_object import BaseValueObject from protean.globals import current_domain -from protean.core.repository.model import BaseModel class Person(BaseAggregate): diff --git a/tests/impl/model/dict_model/tests.py b/tests/impl/model/dict_model/tests.py index 75a8095e..b42c0acd 100644 --- a/tests/impl/model/dict_model/tests.py +++ b/tests/impl/model/dict_model/tests.py @@ -1,10 +1,10 @@ +# Protean import pytest -# Protean from protean.impl.repository.dict_repo import DictModel # Local/Relative Imports -from .elements import Email, Person, User, Provider, ProviderCustomModel, Receiver +from .elements import Email, Person, Provider, ProviderCustomModel, Receiver, User class TestModel: diff --git a/tests/impl/model/elasticsearch_model/elements.py b/tests/impl/model/elasticsearch_model/elements.py index a8302da3..a1e39296 100644 --- a/tests/impl/model/elasticsearch_model/elements.py +++ b/tests/impl/model/elasticsearch_model/elements.py @@ -1,10 +1,11 @@ +# Standard Library Imports import re from collections import defaultdict from datetime import datetime -from elasticsearch_dsl import Text, Keyword - +# Protean +from elasticsearch_dsl import Keyword, Text from protean.core.aggregate import BaseAggregate from protean.core.field.basic import DateTime, Integer, String from protean.core.field.basic import Text as ProteanText diff --git a/tests/impl/model/sqlalchemy_model/postgresql/elements.py b/tests/impl/model/sqlalchemy_model/postgresql/elements.py index a17c3510..af3c9f74 100644 --- a/tests/impl/model/sqlalchemy_model/postgresql/elements.py +++ b/tests/impl/model/sqlalchemy_model/postgresql/elements.py @@ -4,14 +4,13 @@ from collections import defaultdict from datetime import datetime -from sqlalchemy import Column, Text - # Protean from protean.core.aggregate import BaseAggregate from protean.core.field.basic import DateTime, Integer, String from protean.core.field.embedded import ValueObjectField from protean.core.repository.model import BaseModel from protean.core.value_object import BaseValueObject +from sqlalchemy import Column, Text class Person(BaseAggregate): diff --git a/tests/impl/model/sqlalchemy_model/postgresql/test_model.py b/tests/impl/model/sqlalchemy_model/postgresql/test_model.py index 4501bdc5..4f6b2077 100644 --- a/tests/impl/model/sqlalchemy_model/postgresql/test_model.py +++ b/tests/impl/model/sqlalchemy_model/postgresql/test_model.py @@ -1,6 +1,6 @@ +# Protean import pytest -# Protean from protean.impl.repository.sqlalchemy_repo import SqlalchemyModel # Local/Relative Imports diff --git a/tests/impl/model/sqlalchemy_model/sqlite/elements.py b/tests/impl/model/sqlalchemy_model/sqlite/elements.py index a17c3510..af3c9f74 100644 --- a/tests/impl/model/sqlalchemy_model/sqlite/elements.py +++ b/tests/impl/model/sqlalchemy_model/sqlite/elements.py @@ -4,14 +4,13 @@ from collections import defaultdict from datetime import datetime -from sqlalchemy import Column, Text - # Protean from protean.core.aggregate import BaseAggregate from protean.core.field.basic import DateTime, Integer, String from protean.core.field.embedded import ValueObjectField from protean.core.repository.model import BaseModel from protean.core.value_object import BaseValueObject +from sqlalchemy import Column, Text class Person(BaseAggregate): diff --git a/tests/impl/model/sqlalchemy_model/sqlite/test_model.py b/tests/impl/model/sqlalchemy_model/sqlite/test_model.py index 4ec9fca0..750c7bea 100644 --- a/tests/impl/model/sqlalchemy_model/sqlite/test_model.py +++ b/tests/impl/model/sqlalchemy_model/sqlite/test_model.py @@ -1,6 +1,6 @@ +# Protean import pytest -# Protean from protean.impl.repository.sqlalchemy_repo import SqlalchemyModel # Local/Relative Imports