Skip to content

Commit

Permalink
hide helper classes
Browse files Browse the repository at this point in the history
  • Loading branch information
numerodix committed Jun 21, 2011
1 parent 2d8307d commit 638f549
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
10 changes: 1 addition & 9 deletions django_couchdb_utils/tests/__init__.py
Expand Up @@ -19,17 +19,9 @@

from datetime import datetime, timedelta

from couchdbkit.ext.django.loading import get_db

from django_couchdb_utils.auth import User
from django_couchdb_utils.sessions import Session, cleanup_sessions
from django_couchdb_utils.tests.utils import TestHelper


class DbTester(TestHelper):
def setUp(self):
db = get_db('django_couchdb_utils')
db.flush()
from django_couchdb_utils.tests.utils import DbTester


class AuthTests(DbTester):
Expand Down
9 changes: 9 additions & 0 deletions django_couchdb_utils/tests/utils.py
@@ -1,5 +1,7 @@
from django.test import TestCase

from couchdbkit.ext.django.loading import get_db


class TestHelper(TestCase):
def assertExcMsg(self, exc, msg, callable, *args, **kw):
Expand All @@ -14,3 +16,10 @@ def assertExcMsg(self, exc, msg, callable, *args, **kw):
with self.assertRaises(exc) as cm:
callable(*args, **kw)
self.assertEqual(cm.exception.message, msg)


class DbTester(TestHelper):
'''Keep separate from TestHelper to make it subclassable as library code'''
def setUp(self):
db = get_db('django_couchdb_utils')
db.flush()

0 comments on commit 638f549

Please sign in to comment.