mirror of
https://github.com/evennia/evennia.git
synced 2026-03-28 10:37:16 +01:00
Implemented a unit testing framework for Evennia. Unfortunately it seems it is only usable in latest Django SVN, due to a Django bug; Run "manage.py test-evennia" - if you get errors about SUPPORTS_TRANSACTIONS, you are affected by the bug. Since this is only likely to affect evennia devs at this point I added a few base tests in src/objects/tests.py as a template for those willing to help add unit tests.
This commit is contained in:
parent
a7899e0119
commit
502ebff1a2
7 changed files with 227 additions and 15 deletions
|
|
@ -417,7 +417,7 @@ def create_player(name, email, password,
|
|||
new_user = User.objects.create_user(name, email, password)
|
||||
|
||||
# create the associated Player for this User, and tie them together
|
||||
new_player = PlayerDB(db_key=name, user=new_user)
|
||||
new_player = PlayerDB(db_key=name, user=new_user, db_typeclass_path=typeclass)
|
||||
new_player.save()
|
||||
|
||||
# assign mud permissions
|
||||
|
|
|
|||
|
|
@ -133,7 +133,8 @@ def cemit_info(message):
|
|||
infochan = Channel.objects.get_channel(infochan[0])
|
||||
except Exception:
|
||||
return
|
||||
cname = infochan.key
|
||||
cmessage = "\n".join(["[%s]: %s" % (cname, line) for line in message.split('\n')])
|
||||
infochan.msg(cmessage)
|
||||
if infochan:
|
||||
cname = infochan.key
|
||||
cmessage = "\n".join(["[%s]: %s" % (cname, line) for line in message.split('\n')])
|
||||
infochan.msg(cmessage)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue