evennia.server.tests package

Submodules

evennia.server.tests.test_amp_connection module

Test AMP client

class evennia.server.tests.test_amp_connection.TestAMPClientRecv(methodName='runTest')[source]

Bases: evennia.server.tests.test_amp_connection._TestAMP

Test amp client sending data

test_adminportal2server(mocktransport)[source]
test_msgportal2server(mocktransport)[source]
class evennia.server.tests.test_amp_connection.TestAMPClientSend(methodName='runTest')[source]

Bases: evennia.server.tests.test_amp_connection._TestAMP

Test amp client sending data

test_adminserver2portal(mocktransport)[source]
test_msgserver2portal(mocktransport)[source]
class evennia.server.tests.test_amp_connection._TestAMP(methodName='runTest')[source]

Bases: twisted.trial._asynctest.TestCase

_catch_wire_read(mocktransport)[source]

Parse what was supposed to be sent over the wire

_connect_client(mocktransport)[source]

Setup client to send data for testing

_connect_server(mocktransport)[source]

Setup server to send data for testing

setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

evennia.server.tests.test_initial_setup module

Test initial startup procedure

class evennia.server.tests.test_initial_setup.TestInitialSetup(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

test_get_god_account(mocked_accountdb)[source]

evennia.server.tests.test_launcher module

Test the evennia launcher.

class evennia.server.tests.test_launcher.TestLauncher(methodName='runTest')[source]

Bases: twisted.trial._asynctest.TestCase

_catch_wire_read(mocktransport)[source]

Parse what was supposed to be sent over the wire

_msend_status_err(arguments, callback=None, errback=None)[source]
_msend_status_ok(arguments, callback=None, errback=None)[source]
test_file_compact()[source]
test_get_twisted_cmdline()[source]
test_get_twisted_cmdline_nt()[source]
test_is_windows()[source]
test_parse_status()[source]
test_print_info(mockprint)[source]
test_query_status_callback()[source]
test_query_status_not_run(mprint)[source]
test_query_status_run(mprint)[source]
test_reactor_stop(mockstop)[source]
test_wait_for_status(mcalllater)[source]
test_wait_for_status_fail(mcalllater)[source]
test_wait_for_status_reply(mprint, aconn)[source]
test_wait_for_status_reply_fail(mprint)[source]

evennia.server.tests.test_misc module

Testing various individual functionalities in the server package.

class evennia.server.tests.test_misc.MockSettings(setting, value=None)[source]

Bases: object

Class for simulating django.conf.settings. Created with a single value, and then sets the required WEBSERVER_ENABLED setting to True or False depending if we’re testing WEBSERVER_PORTS.

__init__(setting, value=None)[source]

Initialize self. See help(type(self)) for accurate signature.

class evennia.server.tests.test_misc.TestDeprecations(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

Class for testing deprecations.check_errors.

deprecated_settings = ('CMDSET_DEFAULT', 'CMDSET_OOC', 'BASE_COMM_TYPECLASS', 'COMM_TYPECLASS_PATHS', 'CHARACTER_DEFAULT_HOME', 'OBJECT_TYPECLASS_PATHS', 'SCRIPT_TYPECLASS_PATHS', 'ACCOUNT_TYPECLASS_PATHS', 'CHANNEL_TYPECLASS_PATHS', 'SEARCH_MULTIMATCH_SEPARATOR', 'TIME_SEC_PER_MIN', 'TIME_MIN_PER_HOUR', 'TIME_HOUR_PER_DAY', 'TIME_DAY_PER_WEEK', 'TIME_WEEK_PER_MONTH', 'TIME_MONTH_PER_YEAR', 'GAME_DIRECTORY_LISTING')
test_check_errors()[source]

All settings in deprecated_settings should raise a DeprecationWarning if they exist. WEBSERVER_PORTS raises an error if the iterable value passed does not have a tuple as its first element.

class evennia.server.tests.test_misc.ThrottleTest(methodName='runTest')[source]

Bases: evennia.utils.test_resources.EvenniaTest

Class for testing the connection/IP throttle.

test_throttle()[source]
class evennia.server.tests.test_misc.ValidatorTest(methodName='runTest')[source]

Bases: evennia.utils.test_resources.EvenniaTest

test_validator()[source]

evennia.server.tests.test_server module

Test the main server component

class evennia.server.tests.test_server.TestServer(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test server module.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test__server_maintenance_channel_handler_update()[source]
test__server_maintenance_close_connection()[source]
test__server_maintenance_flush()[source]
test__server_maintenance_idle_time()[source]
test__server_maintenance_reset()[source]
test__server_maintenance_validate_scripts()[source]
test_evennia_start()[source]
test_get_info_dict()[source]
test_initial_setup()[source]
test_initial_setup_retry()[source]
test_run_init_hooks()[source]
test_update_defaults(mockchan, mockscript, mockacct, mockobj)[source]

evennia.server.tests.testrunner module

Main test-suite runner of Evennia. The runner collates tests from all over the code base and runs them.

Runs as part of the Evennia’s test suite with ‘evennia test evennia”

class evennia.server.tests.testrunner.EvenniaTestSuiteRunner(pattern=None, top_level=None, verbosity=1, interactive=True, failfast=False, keepdb=False, reverse=False, debug_mode=False, debug_sql=False, parallel=0, tags=None, exclude_tags=None, **kwargs)[source]

Bases: django.test.runner.DiscoverRunner

Pointed to by the TEST_RUNNER setting. This test runner only runs tests on the apps specified in evennia/

avoid running the large number of tests defined by Django

build_suite(test_labels, extra_tests=None, **kwargs)[source]

Build a test suite for Evennia. test_labels is a list of apps to test. If not given, a subset of settings.INSTALLED_APPS will be used.