Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed noise from pre_syncdb signal tests

Only make assertions that actually test the functionality of the
change and not unrelated pieces.
  • Loading branch information...
commit 8dda8a5ecc8f481364dc8f58b4ba319e5b016679 1 parent dffdca1
@dstufft dstufft authored
Showing with 0 additions and 5 deletions.
  1. +0 −5 tests/syncdb_signals/tests.py
View
5 tests/syncdb_signals/tests.py
@@ -1,4 +1,3 @@
-from django.db import connections
from django.db.models import signals
from django.test import TestCase
from django.core import management
@@ -32,7 +31,6 @@ class OneTimeReceiver(object):
def __init__(self):
self.call_counter = 0
self.call_args = None
- self.tables = None # list of tables at the time of the call
def __call__(self, signal, sender, **kwargs):
# Although test runner calls syncdb for several databases,
@@ -40,8 +38,6 @@ def __call__(self, signal, sender, **kwargs):
if kwargs['db'] == SYNCDB_DATABASE:
self.call_counter = self.call_counter + 1
self.call_args = kwargs
- connection = connections[SYNCDB_DATABASE]
- self.tables = connection.introspection.table_names()
# we need to test only one call of syncdb
signals.pre_syncdb.disconnect(pre_syncdb_receiver, sender=models)
@@ -61,7 +57,6 @@ def __call__(self, signal, sender, **kwargs):
class SyncdbSignalTests(TestCase):
def test_pre_syncdb_call_time(self):
self.assertEqual(pre_syncdb_receiver.call_counter, 1)
- self.assertFalse(pre_syncdb_receiver.tables)
def test_pre_syncdb_args(self):
r = PreSyncdbReceiver()
Please sign in to comment.
Something went wrong with that request. Please try again.