Switching to nosetests runner, moving broken tests to a non-module dir,
adding dependency_tests
This commit is contained in:
@@ -19,7 +19,10 @@ projectegg = django_openstack
|
||||
settings = tests.testsettings
|
||||
test = django_openstack
|
||||
eggs = ${buildout:eggs}
|
||||
extra-paths =
|
||||
${buildout:directory}/parts/django-mailer
|
||||
|
||||
[django-mailer]
|
||||
recipe = zc.recipe.egg
|
||||
eggs = django-mailer
|
||||
recipe = zerokspot.recipe.git
|
||||
repository = git://github.com/jtauber/django-mailer.git
|
||||
as_egg = True
|
||||
|
@@ -1 +1 @@
|
||||
from dependency_tests import *
|
||||
#from dependency_tests import *
|
||||
|
2
django-openstack/django_openstack/tests/broken/README
Normal file
2
django-openstack/django_openstack/tests/broken/README
Normal file
@@ -0,0 +1,2 @@
|
||||
Intentionally not a python module so that test runner won't find
|
||||
these broken tests
|
18
django-openstack/django_openstack/tests/dependency_tests.py
Normal file
18
django-openstack/django_openstack/tests/dependency_tests.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||
''' Tests for dependency packages
|
||||
Honestly, this can probably go away once tests that depend on these
|
||||
packages become more ingrained in the code.
|
||||
'''
|
||||
|
||||
from django import test
|
||||
from django.core import mail
|
||||
from mailer import engine
|
||||
from mailer import send_mail
|
||||
|
||||
|
||||
class DjangoMailerPresenceTest(test.TestCase):
|
||||
def test_mailsent(self):
|
||||
send_mail('subject', 'message_body', 'from@test.com', ['to@test.com'])
|
||||
engine.send_all()
|
||||
self.assertEqual(len(mail.outbox), 1)
|
||||
self.assertEqual(mail.outbox[0].subject, 'subject')
|
@@ -16,6 +16,7 @@ INSTALLED_APPS = ['django.contrib.auth',
|
||||
'django_openstack',
|
||||
'django_openstack.tests',
|
||||
'django_openstack.templatetags',
|
||||
'mailer',
|
||||
]
|
||||
ROOT_URLCONF = 'django_openstack.tests.testurls'
|
||||
TEMPLATE_DIRS = (
|
||||
@@ -32,3 +33,5 @@ NOVA_SECRET_KEY = 'test'
|
||||
|
||||
CREDENTIAL_AUTHORIZATION_DAYS = 2
|
||||
CREDENTIAL_DOWNLOAD_URL = TESTSERVER + '/credentials/'
|
||||
|
||||
TEST_RUNNER='django_nose.NoseTestSuiteRunner'
|
||||
|
@@ -1,7 +0,0 @@
|
||||
from credential_tests import *
|
||||
from image_tests import *
|
||||
from instance_tests import *
|
||||
from keypair_tests import *
|
||||
from region_tests import *
|
||||
from volume_tests import *
|
||||
|
||||
|
Reference in New Issue
Block a user