Switching to nosetests runner, moving broken tests to a non-module dir,

adding dependency_tests
This commit is contained in:
Mark Gius
2011-06-22 14:14:28 -07:00
parent c599b40531
commit 3c0934770f
14 changed files with 29 additions and 10 deletions

View File

@@ -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

View File

@@ -1 +1 @@
from dependency_tests import *
#from dependency_tests import *

View File

@@ -0,0 +1,2 @@
Intentionally not a python module so that test runner won't find
these broken tests

View 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')

View File

@@ -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'

View File

@@ -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 *