Made some pep8 fixes
This commit is contained in:
parent
b414eadff2
commit
e1431dca94
4 changed files with 113 additions and 103 deletions
|
|
@ -5,12 +5,9 @@ from unittest import TestCase
|
|||
from django.test import override_settings
|
||||
from evennia.accounts.accounts import AccountSessionHandler
|
||||
from evennia.accounts.accounts import DefaultAccount
|
||||
from evennia.server.session import Session
|
||||
from evennia.utils import create
|
||||
from evennia.utils.test_resources import EvenniaTest
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
class TestAccountSessionHandler(TestCase):
|
||||
"Check AccountSessionHandler class"
|
||||
|
|
@ -73,7 +70,7 @@ class TestDefaultAccount(TestCase):
|
|||
self.account = create.create_account("TestAccount%s" % randint(100000, 999999),
|
||||
email="test@test.com", password="testpassword", typeclass=DefaultAccount)
|
||||
self.assertTrue(self.account.web_get_detail_url())
|
||||
|
||||
|
||||
def test_admin_url(self):
|
||||
"Get object's URL for access via Admin pane"
|
||||
self.account = create.create_account("TestAccount%s" % randint(100000, 999999),
|
||||
|
|
@ -211,17 +208,18 @@ class TestDefaultAccount(TestCase):
|
|||
|
||||
|
||||
class TestAccountPuppetDeletion(EvenniaTest):
|
||||
|
||||
|
||||
@override_settings(MULTISESSION_MODE=2)
|
||||
def test_puppet_deletion(self):
|
||||
# Check for existing chars
|
||||
self.assertFalse(self.account.db._playable_characters, 'Account should not have any chars by default.')
|
||||
|
||||
|
||||
# Add char1 to account's playable characters
|
||||
self.account.db._playable_characters.append(self.char1)
|
||||
self.assertTrue(self.account.db._playable_characters, 'Char was not added to account.')
|
||||
|
||||
|
||||
# See what happens when we delete char1.
|
||||
self.char1.delete()
|
||||
# Playable char list should be empty.
|
||||
self.assertFalse(self.account.db._playable_characters, 'Playable character list is not empty! %s' % self.account.db._playable_characters)
|
||||
self.assertFalse(self.account.db._playable_characters,
|
||||
'Playable character list is not empty! %s' % self.account.db._playable_characters)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue