Skip to content

Commit 21a3735

Browse files
jdufresnepcraciunoiu
authored andcommitted
Move tests out of package directory to top level (django-ses#134)
Avoids mixing test code with package code to cleanly separate the intentions of these directories. More idiomatic with other 3rd party Django libraries such as django-rest-framework and django-debug-toolbar.
1 parent fd5a125 commit 21a3735

File tree

10 files changed

+6
-6
lines changed

10 files changed

+6
-6
lines changed

runtests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
},
2929
MIDDLEWARE_CLASSES=('django.middleware.common.CommonMiddleware',
3030
'django.middleware.csrf.CsrfViewMiddleware'),
31-
ROOT_URLCONF='django_ses.tests.test_urls',
31+
ROOT_URLCONF='tests.test_urls',
3232
)
3333

3434
django.setup()
3535

3636
# Start the test suite now that the settings are configured.
37-
call_command("test", "django_ses")
37+
call_command("test", "tests")
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def get_rate_limit(self):
8787
class SESBackendTest(TestCase):
8888
def setUp(self):
8989
# TODO: Fix this -- this is going to cause side effects
90-
django_settings.EMAIL_BACKEND = 'django_ses.tests.test_backend.FakeSESBackend'
90+
django_settings.EMAIL_BACKEND = 'tests.test_backend.FakeSESBackend'
9191
django_ses.SESConnection = FakeSESConnection
9292
self.outbox = FakeSESConnection.outbox
9393

@@ -177,7 +177,7 @@ def test_return_path(self):
177177
class SESBackendTestReturn(TestCase):
178178
def setUp(self):
179179
# TODO: Fix this -- this is going to cause side effects
180-
django_settings.EMAIL_BACKEND = 'django_ses.tests.test_backend.FakeSESBackend'
180+
django_settings.EMAIL_BACKEND = 'tests.test_backend.FakeSESBackend'
181181
django_ses.SESConnection = FakeSESConnection
182182
self.outbox = FakeSESConnection.outbox
183183

@@ -194,7 +194,7 @@ def test_return_path(self):
194194
class SESBackendTestProxySettings(TestCase):
195195
def setUp(self):
196196
# TODO: Fix this -- this is going to cause side effects
197-
django_settings.EMAIL_BACKEND = 'django_ses.tests.test_backend.FakeSESBackend'
197+
django_settings.EMAIL_BACKEND = 'tests.test_backend.FakeSESBackend'
198198
django_ses.SESConnection = FakeSESConnection
199199
self.outbox = FakeSESConnection.outbox
200200
settings.AWS_SES_PROXY = 'some.proxy.host.tld'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from django.test import TestCase
22
from django.conf import settings
3-
from django_ses.tests.utils import unload_django_ses
3+
from tests.utils import unload_django_ses
44

55

66
class SettingsImportTest(TestCase):

0 commit comments

Comments
 (0)