Skip to content

Commit

Permalink
Added a common base TestCase class
Browse files Browse the repository at this point in the history
  • Loading branch information
croach committed Apr 11, 2012
1 parent d5d2b14 commit 97c0fee
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tests.py → test.py
Expand Up @@ -11,7 +11,7 @@
from random import choice
from datetime import datetime, date, timedelta

from django.test import TestCase
import django.test
from django.test.client import Client
from django.core.exceptions import MiddlewareNotUsed
from django.db import connection
Expand Down Expand Up @@ -56,6 +56,15 @@ def process_response(self, request, response):
return response


class TestCase(django.test.TestCase):
"""
Common base class for all Freshplum unit tests to inherit from.
"""

multi_db = True
"""Flag to make sure that Django properly loads fixtures for every database"""


class UtilsTestCase(TestCase):
def setUp(self):
self.client = Client()
Expand Down Expand Up @@ -83,4 +92,4 @@ def testStripHtml(self):
if BeautifulSoup:
self.assertEqual(strip(self.text), self.stripped_text)
else:
logger.info('\nutils > manage_html.py: BEAUTIFUL SOUP NOT INSTALLED')
logger.info('\nutils > manage_html.py: BEAUTIFUL SOUP NOT INSTALLED')

0 comments on commit 97c0fee

Please sign in to comment.