Skip to content

Commit

Permalink
Optimized project imports (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 authored and mixxorz committed Jun 11, 2018
1 parent dec74d4 commit 4e85842
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 11 deletions.
1 change: 1 addition & 0 deletions compilemessages.py
@@ -1,4 +1,5 @@
import os

import django
from django.conf import settings
from django.core import management
Expand Down
1 change: 1 addition & 0 deletions makemessages.py
@@ -1,4 +1,5 @@
import os

import django
from django.conf import settings
from django.core import management
Expand Down
1 change: 0 additions & 1 deletion runtests.py
Expand Up @@ -4,7 +4,6 @@
from django.conf import settings
from django.test.runner import DiscoverRunner


settings.configure(
DATABASES={
'default': {
Expand Down
2 changes: 1 addition & 1 deletion setup.py
@@ -1,9 +1,9 @@
import os

from setuptools import find_packages, setup

import service_objects


BASE_DIR = os.path.dirname(__file__)
README_PATH = os.path.join(BASE_DIR, 'README.md')

Expand Down
1 change: 1 addition & 0 deletions tests/services.py
@@ -1,4 +1,5 @@
from django import forms

from service_objects.services import Service


Expand Down
3 changes: 1 addition & 2 deletions tests/test_fields.py
@@ -1,11 +1,10 @@
from unittest import TestCase

from django import forms
from django.core.exceptions import ValidationError

from service_objects.fields import MultipleFormField, ModelField, MultipleModelField
from tests.models import FooModel, BarModel, NonModel
from tests.forms import FooForm
from tests.models import FooModel, BarModel, NonModel


class MultipleFormFieldTest(TestCase):
Expand Down
6 changes: 2 additions & 4 deletions tests/test_services.py
Expand Up @@ -3,18 +3,16 @@
except ImportError:
from mock import Mock, patch

import six
from unittest import TestCase

import six
from django import forms
from django.db import models

from service_objects.errors import InvalidInputsError
from service_objects.services import Service, ModelService
from service_objects.services import ModelService
from tests.models import FooModel
from tests.services import FooService, MockService, NoDbTransactionService


MockService.process = Mock()
NoDbTransactionService.process = Mock()

Expand Down
5 changes: 2 additions & 3 deletions tests/test_views.py
Expand Up @@ -7,9 +7,8 @@

from django.core.exceptions import ValidationError, NON_FIELD_ERRORS

from service_objects.views import ServiceView
from service_objects.errors import InvalidInputsError

from service_objects.views import ServiceView

MockService = MagicMock()

Expand Down Expand Up @@ -45,7 +44,7 @@ class ExceptionServiceException(Exception):
{
NON_FIELD_ERRORS: [non_field_error,],
'field1': [field1_error,],
},
},
{
'field1': [field1_error,],
}
Expand Down

0 comments on commit 4e85842

Please sign in to comment.