Made unittests validate again.

This commit is contained in:
Griatch 2014-04-21 16:40:14 +02:00
parent 93d9545819
commit 033552cd04
2 changed files with 3 additions and 2 deletions

View file

@ -78,6 +78,7 @@ class CommandTest(TestCase):
CID = 0 # we must set a different CID in every test to avoid unique-name collisions creating the objects
def setUp(self):
"sets up testing environment"
settings.DEFAULT_HOME = "#2"
#print "creating player %i: %s" % (self.CID, self.__class__.__name__)
self.player = create.create_player("TestPlayer%i" % self.CID, "test@test.com", "testpassword", typeclass=TestPlayerClass)
self.player2 = create.create_player("TestPlayer%ib" % self.CID, "test@test.com", "testpassword", typeclass=TestPlayerClass)

View file

@ -360,8 +360,8 @@ class ChannelDB(TypedObject):
def __init__(self, *args, **kwargs):
TypedObject.__init__(self, *args, **kwargs)
_SA(self, "attributes", AttributeHandler(self))
_SA(self, "tags", TagHandler(self))
_SA(self, "attributes", AttributeHandler(self))
_SA(self, "aliases", AliasHandler(self))
class Meta:
@ -432,8 +432,8 @@ class ChannelDB(TypedObject):
"""
Deletes channel while also cleaning up channelhandler
"""
super(ChannelDB, self).delete()
_GA(self, "attributes").clear()
_GA(self, "aliases").clear()
super(ChannelDB, self).delete()
from src.comms.channelhandler import CHANNELHANDLER
CHANNELHANDLER.update()