mirror of
https://github.com/evennia/evennia.git
synced 2026-03-21 15:26:30 +01:00
585 lines
No EOL
55 KiB
HTML
585 lines
No EOL
55 KiB
HTML
<!DOCTYPE html>
|
||
|
||
<html lang="en" data-content_root="../">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
|
||
<title>evennia.utils.test_resources — Evennia latest documentation</title>
|
||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=d75fae25" />
|
||
<link rel="stylesheet" type="text/css" href="../_static/nature.css?v=279e0f84" />
|
||
<link rel="stylesheet" type="text/css" href="../_static/custom.css?v=e4a91a55" />
|
||
<script src="../_static/documentation_options.js?v=c6e86fd7"></script>
|
||
<script src="../_static/doctools.js?v=9bcbadda"></script>
|
||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||
<link rel="icon" href="../_static/favicon.ico"/>
|
||
<link rel="index" title="Index" href="../genindex.html" />
|
||
<link rel="search" title="Search" href="../search.html" />
|
||
<link rel="next" title="evennia.utils.text2html" href="evennia.utils.text2html.html" />
|
||
<link rel="prev" title="evennia.utils.search" href="evennia.utils.search.html" />
|
||
</head><body>
|
||
<div class="related" role="navigation" aria-label="Related">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="../genindex.html" title="General Index"
|
||
accesskey="I">index</a></li>
|
||
<li class="right" >
|
||
<a href="../py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="evennia.utils.text2html.html" title="evennia.utils.text2html"
|
||
accesskey="N">next</a> |</li>
|
||
<li class="right" >
|
||
<a href="evennia.utils.search.html" title="evennia.utils.search"
|
||
accesskey="P">previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="../index.html">Evennia</a> »</li>
|
||
<li class="nav-item nav-item-1"><a href="../Evennia-API.html" >API Summary</a> »</li>
|
||
<li class="nav-item nav-item-2"><a href="evennia-api.html" >evennia</a> »</li>
|
||
<li class="nav-item nav-item-3"><a href="evennia.html" >evennia</a> »</li>
|
||
<li class="nav-item nav-item-4"><a href="evennia.utils.html" accesskey="U">evennia.utils</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">evennia.utils.test_resources</a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="document">
|
||
<div class="documentwrapper">
|
||
<div class="bodywrapper">
|
||
<div class="body" role="main">
|
||
|
||
<section id="module-evennia.utils.test_resources">
|
||
<span id="evennia-utils-test-resources"></span><h1>evennia.utils.test_resources<a class="headerlink" href="#module-evennia.utils.test_resources" title="Link to this heading">¶</a></h1>
|
||
<p>Various helper resources for writing unittests.</p>
|
||
<p>Classes for testing Evennia core:</p>
|
||
<ul class="simple">
|
||
<li><p><strong>BaseEvenniaTestCase</strong> - no default objects, only enforced default settings</p></li>
|
||
<li><p><strong>BaseEvenniaTest</strong> - all default objects, enforced default settings</p></li>
|
||
<li><p><strong>BaseEvenniaCommandTest</strong> - for testing Commands, enforced default settings</p></li>
|
||
</ul>
|
||
<p>Classes for testing game folder content:</p>
|
||
<ul class="simple">
|
||
<li><dl class="simple">
|
||
<dt><strong>EvenniaTestCase</strong> - no default objects, using gamedir settings (identical to</dt><dd><p>standard Python TestCase)</p>
|
||
</dd>
|
||
</dl>
|
||
</li>
|
||
<li><p><strong>EvenniaTest</strong> - all default objects, using gamedir settings</p></li>
|
||
<li><p><strong>EvenniaCommandTest</strong> - for testing game folder commands, using gamedir settings</p></li>
|
||
</ul>
|
||
<p>Other:</p>
|
||
<ul class="simple">
|
||
<li><p><strong>EvenniaTestMixin</strong> - A class mixin for creating the test environment objects, for
|
||
making custom tests.</p></li>
|
||
<li><p><strong>EvenniaCommandMixin</strong> - A class mixin that adds support for command testing with the .call()
|
||
helper. Used by the command-test classes, but can be used for making a customt test class.</p></li>
|
||
</ul>
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.mockdelay">
|
||
<span class="sig-prename descclassname"><span class="pre">evennia.utils.test_resources.</span></span><span class="sig-name descname"><span class="pre">mockdelay</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">timedelay</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">callback</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#mockdelay"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.mockdelay" title="Link to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.mockdeferLater">
|
||
<span class="sig-prename descclassname"><span class="pre">evennia.utils.test_resources.</span></span><span class="sig-name descname"><span class="pre">mockdeferLater</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">reactor</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">timedelay</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">callback</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#mockdeferLater"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.mockdeferLater" title="Link to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.unload_module">
|
||
<span class="sig-prename descclassname"><span class="pre">evennia.utils.test_resources.</span></span><span class="sig-name descname"><span class="pre">unload_module</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">module</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#unload_module"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.unload_module" title="Link to this definition">¶</a></dt>
|
||
<dd><p>Reset import so one can mock global constants.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p><strong>module</strong> (<em>module</em><em>, </em><em>object</em><em> or </em><em>str</em>) – The module will
|
||
be removed so it will have to be imported again. If given
|
||
an object, the module in which that object sits will be unloaded. A string
|
||
should directly give the module pathname to unload.</p>
|
||
</dd>
|
||
</dl>
|
||
<p class="rubric">Example</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># (in a test method)</span>
|
||
<span class="n">unload_module</span><span class="p">(</span><span class="n">foo</span><span class="p">)</span>
|
||
<span class="k">with</span> <span class="n">mock</span><span class="o">.</span><span class="n">patch</span><span class="p">(</span><span class="s2">"foo.GLOBALTHING"</span><span class="p">,</span> <span class="s2">"mockval"</span><span class="p">):</span>
|
||
<span class="kn">import</span><span class="w"> </span><span class="nn">foo</span>
|
||
<span class="o">...</span> <span class="c1"># test code using foo.GLOBALTHING, now set to 'mockval'</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>This allows for mocking constants global to the module, since
|
||
otherwise those would not be mocked (since a module is only
|
||
loaded once).</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTestMixin">
|
||
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">evennia.utils.test_resources.</span></span><span class="sig-name descname"><span class="pre">EvenniaTestMixin</span></span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#EvenniaTestMixin"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTestMixin" title="Link to this definition">¶</a></dt>
|
||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||
<p>Evennia test environment mixin</p>
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTestMixin.account_typeclass">
|
||
<span class="sig-name descname"><span class="pre">account_typeclass</span></span><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTestMixin.account_typeclass" title="Link to this definition">¶</a></dt>
|
||
<dd><p>alias of <a class="reference internal" href="evennia.accounts.accounts.html#evennia.accounts.accounts.DefaultAccount" title="evennia.accounts.accounts.DefaultAccount"><code class="xref py py-class docutils literal notranslate"><span class="pre">DefaultAccount</span></code></a></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTestMixin.object_typeclass">
|
||
<span class="sig-name descname"><span class="pre">object_typeclass</span></span><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTestMixin.object_typeclass" title="Link to this definition">¶</a></dt>
|
||
<dd><p>alias of <a class="reference internal" href="evennia.objects.objects.html#evennia.objects.objects.DefaultObject" title="evennia.objects.objects.DefaultObject"><code class="xref py py-class docutils literal notranslate"><span class="pre">DefaultObject</span></code></a></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTestMixin.character_typeclass">
|
||
<span class="sig-name descname"><span class="pre">character_typeclass</span></span><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTestMixin.character_typeclass" title="Link to this definition">¶</a></dt>
|
||
<dd><p>alias of <a class="reference internal" href="evennia.objects.objects.html#evennia.objects.objects.DefaultCharacter" title="evennia.objects.objects.DefaultCharacter"><code class="xref py py-class docutils literal notranslate"><span class="pre">DefaultCharacter</span></code></a></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTestMixin.exit_typeclass">
|
||
<span class="sig-name descname"><span class="pre">exit_typeclass</span></span><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTestMixin.exit_typeclass" title="Link to this definition">¶</a></dt>
|
||
<dd><p>alias of <a class="reference internal" href="evennia.objects.objects.html#evennia.objects.objects.DefaultExit" title="evennia.objects.objects.DefaultExit"><code class="xref py py-class docutils literal notranslate"><span class="pre">DefaultExit</span></code></a></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTestMixin.room_typeclass">
|
||
<span class="sig-name descname"><span class="pre">room_typeclass</span></span><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTestMixin.room_typeclass" title="Link to this definition">¶</a></dt>
|
||
<dd><p>alias of <a class="reference internal" href="evennia.objects.objects.html#evennia.objects.objects.DefaultRoom" title="evennia.objects.objects.DefaultRoom"><code class="xref py py-class docutils literal notranslate"><span class="pre">DefaultRoom</span></code></a></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTestMixin.script_typeclass">
|
||
<span class="sig-name descname"><span class="pre">script_typeclass</span></span><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTestMixin.script_typeclass" title="Link to this definition">¶</a></dt>
|
||
<dd><p>alias of <a class="reference internal" href="evennia.scripts.scripts.html#evennia.scripts.scripts.DefaultScript" title="evennia.scripts.scripts.DefaultScript"><code class="xref py py-class docutils literal notranslate"><span class="pre">DefaultScript</span></code></a></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTestMixin.create_accounts">
|
||
<span class="sig-name descname"><span class="pre">create_accounts</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#EvenniaTestMixin.create_accounts"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTestMixin.create_accounts" title="Link to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTestMixin.teardown_accounts">
|
||
<span class="sig-name descname"><span class="pre">teardown_accounts</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#EvenniaTestMixin.teardown_accounts"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTestMixin.teardown_accounts" title="Link to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTestMixin.create_rooms">
|
||
<span class="sig-name descname"><span class="pre">create_rooms</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#EvenniaTestMixin.create_rooms"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTestMixin.create_rooms" title="Link to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTestMixin.create_objs">
|
||
<span class="sig-name descname"><span class="pre">create_objs</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#EvenniaTestMixin.create_objs"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTestMixin.create_objs" title="Link to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTestMixin.create_chars">
|
||
<span class="sig-name descname"><span class="pre">create_chars</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#EvenniaTestMixin.create_chars"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTestMixin.create_chars" title="Link to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTestMixin.create_script">
|
||
<span class="sig-name descname"><span class="pre">create_script</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#EvenniaTestMixin.create_script"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTestMixin.create_script" title="Link to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTestMixin.setup_session">
|
||
<span class="sig-name descname"><span class="pre">setup_session</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#EvenniaTestMixin.setup_session"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTestMixin.setup_session" title="Link to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTestMixin.teardown_session">
|
||
<span class="sig-name descname"><span class="pre">teardown_session</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#EvenniaTestMixin.teardown_session"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTestMixin.teardown_session" title="Link to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTestMixin.setUp">
|
||
<span class="sig-name descname"><span class="pre">setUp</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#EvenniaTestMixin.setUp"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTestMixin.setUp" title="Link to this definition">¶</a></dt>
|
||
<dd><p>Sets up testing environment</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTestMixin.tearDown">
|
||
<span class="sig-name descname"><span class="pre">tearDown</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#EvenniaTestMixin.tearDown"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTestMixin.tearDown" title="Link to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaCommandTestMixin">
|
||
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">evennia.utils.test_resources.</span></span><span class="sig-name descname"><span class="pre">EvenniaCommandTestMixin</span></span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#EvenniaCommandTestMixin"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.EvenniaCommandTestMixin" title="Link to this definition">¶</a></dt>
|
||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||
<p>Mixin to add to a test in order to provide the <strong>.call</strong> helper for
|
||
testing the execution and returns of a command.</p>
|
||
<p>Tests a Command by running it and comparing what messages it sends with
|
||
expected values. This tests without actually spinning up the cmdhandler
|
||
for every test, which is more controlled.</p>
|
||
<p>Example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">commands.echo</span><span class="w"> </span><span class="kn">import</span> <span class="n">CmdEcho</span>
|
||
|
||
<span class="k">class</span><span class="w"> </span><span class="nc">MyCommandTest</span><span class="p">(</span><span class="n">EvenniaTest</span><span class="p">,</span> <span class="n">CommandTestMixin</span><span class="p">):</span>
|
||
|
||
<span class="k">def</span><span class="w"> </span><span class="nf">test_echo</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||
<span class="w"> </span><span class="sd">'''</span>
|
||
<span class="sd"> Test that the echo command really returns</span>
|
||
<span class="sd"> what you pass into it.</span>
|
||
<span class="sd"> '''</span>
|
||
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="n">MyCommand</span><span class="p">(),</span> <span class="s2">"hello world!"</span><span class="p">,</span>
|
||
<span class="s2">"You hear your echo: 'Hello world!'"</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaCommandTestMixin.call">
|
||
<span class="sig-name descname"><span class="pre">call</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cmdobj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">input_args</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cmdset</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">noansi</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">caller</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">receiver</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cmdstring</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">obj</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">inputs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raw_string</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">use_assertequal</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#EvenniaCommandTestMixin.call"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.EvenniaCommandTestMixin.call" title="Link to this definition">¶</a></dt>
|
||
<dd><p>Test a command by assigning all the needed properties to a cmdobj and
|
||
running the sequence. The resulting <strong>.msg</strong> calls will be mocked and
|
||
the text= calls to them compared to a expected output.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>cmdobj</strong> (<a class="reference internal" href="evennia.commands.command.html#evennia.commands.command.Command" title="evennia.commands.command.Command"><em>Command</em></a>) – The command object to use.</p></li>
|
||
<li><p><strong>input_args</strong> (<em>str</em>) – This should be the full input the Command should
|
||
see, such as ‘look here’. This will become <strong>.args</strong> for the Command
|
||
instance to parse.</p></li>
|
||
<li><p><strong>msg</strong> (<em>str</em><em> or </em><em>dict</em><em>, </em><em>optional</em>) – This is the expected return value(s)
|
||
returned through <strong>caller.msg(text=…)</strong> calls in the command. If a string, the
|
||
receiver is controlled with the <strong>receiver</strong> kwarg (defaults to <strong>caller</strong>).
|
||
If this is a <strong>dict</strong>, it is a mapping
|
||
<strong>{receiver1: “expected1”, receiver2: “expected2”,…}</strong> and <strong>receiver</strong> is
|
||
ignored. The message(s) are compared with the actual messages returned
|
||
to the receiver(s) as the Command runs. Each check uses <strong>.startswith</strong>,
|
||
so you can choose to only include the first part of the
|
||
returned message if that’s enough to verify a correct result. EvMenu
|
||
decorations (like borders) are stripped and should not be included. This
|
||
should also not include color tags unless <strong>noansi=False</strong>.
|
||
If the command returns texts in multiple separate <strong>.msg</strong>-
|
||
calls to a receiver, separate these with <strong>|</strong> if <strong>noansi=True</strong>
|
||
(default) and <strong>||</strong> if <strong>noansi=False</strong>. If no <strong>msg</strong> is given (<strong>None</strong>),
|
||
then no automatic comparison will be done.</p></li>
|
||
<li><p><strong>cmdset</strong> (<em>str</em><em>, </em><em>optional</em>) – If given, make <strong>.cmdset</strong> available on the Command
|
||
instance as it runs. While <strong>.cmdset</strong> is normally available on the
|
||
Command instance by default, this is usually only used by
|
||
commands that explicitly operates/displays cmdsets, like
|
||
<strong>examine</strong>.</p></li>
|
||
<li><p><strong>noansi</strong> (<em>str</em><em>, </em><em>optional</em>) – By default the color tags of the <strong>msg</strong> is
|
||
ignored, this makes them significant. If unset, <strong>msg</strong> must contain
|
||
the same color tags as the actual return message.</p></li>
|
||
<li><p><strong>caller</strong> (<em>Object</em><em> or </em><em>Account</em><em>, </em><em>optional</em>) – By default <strong>self.char1</strong> is used as the
|
||
command-caller (the <strong>.caller</strong> property on the Command). This allows to
|
||
execute with another caller, most commonly an Account.</p></li>
|
||
<li><p><strong>receiver</strong> (<em>Object</em><em> or </em><em>Account</em><em>, </em><em>optional</em>) – This is the object to receive the
|
||
return messages we want to test. By default this is the same as <strong>caller</strong>
|
||
(which in turn defaults to is <strong>self.char1</strong>). Note that if <strong>msg</strong> is
|
||
a <strong>dict</strong>, this is ignored since the receiver is already specified there.</p></li>
|
||
<li><p><strong>cmdstring</strong> (<em>str</em><em>, </em><em>optional</em>) – Normally this is the Command’s <strong>key</strong>.
|
||
This allows for tweaking the <strong>.cmdname</strong> property of the
|
||
Command**. This isb used for commands with multiple aliases,
|
||
where the command explicitly checs which alias was used to
|
||
determine its functionality.</p></li>
|
||
<li><p><strong>obj</strong> (<em>str</em><em>, </em><em>optional</em>) – This sets the <strong>.obj</strong> property of the Command - the
|
||
object on which the Command ‘sits’. By default this is the same as <strong>caller</strong>.
|
||
This can be used for testing on-object Command interactions.</p></li>
|
||
<li><p><strong>inputs</strong> (<em>list</em><em>, </em><em>optional</em>) – A list of strings to pass to functions that pause to
|
||
take input from the user (normally using <strong>@interactive</strong> and
|
||
<strong>ret = yield(question)</strong> or <strong>evmenu.get_input</strong>). Each element of the
|
||
list will be passed into the command as if the user answered each prompt
|
||
in that order.</p></li>
|
||
<li><p><strong>raw_string</strong> (<em>str</em><em>, </em><em>optional</em>) – Normally the <strong>.raw_string</strong> property is set as
|
||
a combination of your <strong>key/cmdname</strong> and <strong>input_args</strong>. This allows
|
||
direct control of what this is, for example for testing edge cases
|
||
or malformed inputs.</p></li>
|
||
<li><p><strong>use_assertequal</strong> (<em>bool</em><em>, </em><em>optional</em>) – If <strong>True</strong>, the error message will use
|
||
a regular assertEqual. This will show show whitepace differences easier, but
|
||
doesn’t allow for only matching against the start of the returned message.</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p><p><em>str or dict</em> –</p>
|
||
<dl class="simple">
|
||
<dt>The message sent to <strong>receiver</strong>, or a dict of</dt><dd><p><strong>{receiver: “msg”, …}</strong> if multiple are given. This is usually
|
||
only used with <strong>msg=None</strong> to do the validation externally.</p>
|
||
</dd>
|
||
</dl>
|
||
</p>
|
||
</dd>
|
||
<dt class="field-odd">Raises<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p><strong>AssertionError</strong> – If the returns of <strong>.msg</strong> calls (tested with <strong>.startswith</strong>) does not
|
||
match <strong>expected_input</strong>.</p>
|
||
</dd>
|
||
</dl>
|
||
<p class="rubric">Notes</p>
|
||
<p>As part of the tests, all methods of the Command will be called in
|
||
the proper order:</p>
|
||
<ul class="simple">
|
||
<li><p>cmdobj.at_pre_cmd()</p></li>
|
||
<li><p>cmdobj.parse()</p></li>
|
||
<li><p>cmdobj.func()</p></li>
|
||
<li><p>cmdobj.at_post_cmd()</p></li>
|
||
</ul>
|
||
</dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.BaseEvenniaTestCase">
|
||
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">evennia.utils.test_resources.</span></span><span class="sig-name descname"><span class="pre">BaseEvenniaTestCase</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">methodName</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'runTest'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#BaseEvenniaTestCase"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.BaseEvenniaTestCase" title="Link to this definition">¶</a></dt>
|
||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">TestCase</span></code></p>
|
||
<p>Base test (with no default objects) but with enforced default settings.</p>
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.BaseEvenniaTestCase.tearDown">
|
||
<span class="sig-name descname"><span class="pre">tearDown</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#BaseEvenniaTestCase.tearDown"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.BaseEvenniaTestCase.tearDown" title="Link to this definition">¶</a></dt>
|
||
<dd><p>Hook method for deconstructing the test fixture after testing it.</p>
|
||
</dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTestCase">
|
||
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">evennia.utils.test_resources.</span></span><span class="sig-name descname"><span class="pre">EvenniaTestCase</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">methodName</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'runTest'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#EvenniaTestCase"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTestCase" title="Link to this definition">¶</a></dt>
|
||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">TestCase</span></code></p>
|
||
<p>For use with gamedir settings; Just like the normal test case, only for naming consistency.</p>
|
||
<p>Notes:</p>
|
||
<ul class="simple">
|
||
<li><p>Inheriting from this class will bypass EvenniaTestMixin, and therefore
|
||
not setup some default objects. This can result in faster tests.</p></li>
|
||
<li><p>If you do inherit from this class for your unit tests, and have
|
||
overridden the tearDown() method, please also call flush_cache(). Not
|
||
doing so will result in flakey and order-dependent tests due to the
|
||
Django ID cache not being flushed.</p></li>
|
||
</ul>
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTestCase.tearDown">
|
||
<span class="sig-name descname"><span class="pre">tearDown</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#EvenniaTestCase.tearDown"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTestCase.tearDown" title="Link to this definition">¶</a></dt>
|
||
<dd><p>Hook method for deconstructing the test fixture after testing it.</p>
|
||
</dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.BaseEvenniaTest">
|
||
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">evennia.utils.test_resources.</span></span><span class="sig-name descname"><span class="pre">BaseEvenniaTest</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">methodName</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'runTest'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#BaseEvenniaTest"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.BaseEvenniaTest" title="Link to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestMixin" title="evennia.utils.test_resources.EvenniaTestMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">EvenniaTestMixin</span></code></a>, <code class="xref py py-class docutils literal notranslate"><span class="pre">TestCase</span></code></p>
|
||
<p>This class parent has all default objects and uses only default settings.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTest">
|
||
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">evennia.utils.test_resources.</span></span><span class="sig-name descname"><span class="pre">EvenniaTest</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">methodName</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'runTest'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#EvenniaTest"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTest" title="Link to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestMixin" title="evennia.utils.test_resources.EvenniaTestMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">EvenniaTestMixin</span></code></a>, <code class="xref py py-class docutils literal notranslate"><span class="pre">TestCase</span></code></p>
|
||
<p>This test class is intended for inheriting in mygame tests.
|
||
It helps ensure your tests are run with your own objects
|
||
and settings from your game folder.</p>
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTest.account_typeclass">
|
||
<span class="sig-name descname"><span class="pre">account_typeclass</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'typeclasses.accounts.Account'</span></em><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTest.account_typeclass" title="Link to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTest.object_typeclass">
|
||
<span class="sig-name descname"><span class="pre">object_typeclass</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'typeclasses.objects.Object'</span></em><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTest.object_typeclass" title="Link to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTest.character_typeclass">
|
||
<span class="sig-name descname"><span class="pre">character_typeclass</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'typeclasses.characters.Character'</span></em><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTest.character_typeclass" title="Link to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTest.exit_typeclass">
|
||
<span class="sig-name descname"><span class="pre">exit_typeclass</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'typeclasses.exits.Exit'</span></em><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTest.exit_typeclass" title="Link to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTest.room_typeclass">
|
||
<span class="sig-name descname"><span class="pre">room_typeclass</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'typeclasses.rooms.Room'</span></em><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTest.room_typeclass" title="Link to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaTest.script_typeclass">
|
||
<span class="sig-name descname"><span class="pre">script_typeclass</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'typeclasses.scripts.Script'</span></em><a class="headerlink" href="#evennia.utils.test_resources.EvenniaTest.script_typeclass" title="Link to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.BaseEvenniaCommandTest">
|
||
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">evennia.utils.test_resources.</span></span><span class="sig-name descname"><span class="pre">BaseEvenniaCommandTest</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">methodName</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'runTest'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#BaseEvenniaCommandTest"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.BaseEvenniaCommandTest" title="Link to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.utils.test_resources.BaseEvenniaTest" title="evennia.utils.test_resources.BaseEvenniaTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">BaseEvenniaTest</span></code></a>, <a class="reference internal" href="#evennia.utils.test_resources.EvenniaCommandTestMixin" title="evennia.utils.test_resources.EvenniaCommandTestMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">EvenniaCommandTestMixin</span></code></a></p>
|
||
<p>Commands only using the default settings.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="evennia.utils.test_resources.EvenniaCommandTest">
|
||
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">evennia.utils.test_resources.</span></span><span class="sig-name descname"><span class="pre">EvenniaCommandTest</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">methodName</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'runTest'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/test_resources.html#EvenniaCommandTest"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#evennia.utils.test_resources.EvenniaCommandTest" title="Link to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.utils.test_resources.EvenniaTest" title="evennia.utils.test_resources.EvenniaTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">EvenniaTest</span></code></a>, <a class="reference internal" href="#evennia.utils.test_resources.EvenniaCommandTestMixin" title="evennia.utils.test_resources.EvenniaCommandTestMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">EvenniaCommandTestMixin</span></code></a></p>
|
||
<p>Parent class to inherit from - makes tests use your own
|
||
classes and settings in mygame.</p>
|
||
</dd></dl>
|
||
|
||
</section>
|
||
|
||
|
||
<div class="clearer"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
||
<div class="sphinxsidebarwrapper">
|
||
<p class="logo"><a href="../index.html">
|
||
<img class="logo" src="../_static/evennia_logo.png" alt="Logo of Evennia"/>
|
||
</a></p>
|
||
<search id="searchbox" style="display: none" role="search">
|
||
<h3 id="searchlabel">Quick search</h3>
|
||
<div class="searchformwrapper">
|
||
<form class="search" action="../search.html" method="get">
|
||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
||
<input type="submit" value="Go" />
|
||
</form>
|
||
</div>
|
||
</search>
|
||
<script>document.getElementById('searchbox').style.display = "block"</script>
|
||
<h3><a href="../index.html">Table of Contents</a></h3>
|
||
<ul>
|
||
<li><a class="reference internal" href="#">evennia.utils.test_resources</a><ul>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.mockdelay"><code class="docutils literal notranslate"><span class="pre">mockdelay()</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.mockdeferLater"><code class="docutils literal notranslate"><span class="pre">mockdeferLater()</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.unload_module"><code class="docutils literal notranslate"><span class="pre">unload_module()</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestMixin"><code class="docutils literal notranslate"><span class="pre">EvenniaTestMixin</span></code></a><ul>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestMixin.account_typeclass"><code class="docutils literal notranslate"><span class="pre">EvenniaTestMixin.account_typeclass</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestMixin.object_typeclass"><code class="docutils literal notranslate"><span class="pre">EvenniaTestMixin.object_typeclass</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestMixin.character_typeclass"><code class="docutils literal notranslate"><span class="pre">EvenniaTestMixin.character_typeclass</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestMixin.exit_typeclass"><code class="docutils literal notranslate"><span class="pre">EvenniaTestMixin.exit_typeclass</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestMixin.room_typeclass"><code class="docutils literal notranslate"><span class="pre">EvenniaTestMixin.room_typeclass</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestMixin.script_typeclass"><code class="docutils literal notranslate"><span class="pre">EvenniaTestMixin.script_typeclass</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestMixin.create_accounts"><code class="docutils literal notranslate"><span class="pre">EvenniaTestMixin.create_accounts()</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestMixin.teardown_accounts"><code class="docutils literal notranslate"><span class="pre">EvenniaTestMixin.teardown_accounts()</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestMixin.create_rooms"><code class="docutils literal notranslate"><span class="pre">EvenniaTestMixin.create_rooms()</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestMixin.create_objs"><code class="docutils literal notranslate"><span class="pre">EvenniaTestMixin.create_objs()</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestMixin.create_chars"><code class="docutils literal notranslate"><span class="pre">EvenniaTestMixin.create_chars()</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestMixin.create_script"><code class="docutils literal notranslate"><span class="pre">EvenniaTestMixin.create_script()</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestMixin.setup_session"><code class="docutils literal notranslate"><span class="pre">EvenniaTestMixin.setup_session()</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestMixin.teardown_session"><code class="docutils literal notranslate"><span class="pre">EvenniaTestMixin.teardown_session()</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestMixin.setUp"><code class="docutils literal notranslate"><span class="pre">EvenniaTestMixin.setUp()</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestMixin.tearDown"><code class="docutils literal notranslate"><span class="pre">EvenniaTestMixin.tearDown()</span></code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaCommandTestMixin"><code class="docutils literal notranslate"><span class="pre">EvenniaCommandTestMixin</span></code></a><ul>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaCommandTestMixin.call"><code class="docutils literal notranslate"><span class="pre">EvenniaCommandTestMixin.call()</span></code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.BaseEvenniaTestCase"><code class="docutils literal notranslate"><span class="pre">BaseEvenniaTestCase</span></code></a><ul>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.BaseEvenniaTestCase.tearDown"><code class="docutils literal notranslate"><span class="pre">BaseEvenniaTestCase.tearDown()</span></code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestCase"><code class="docutils literal notranslate"><span class="pre">EvenniaTestCase</span></code></a><ul>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTestCase.tearDown"><code class="docutils literal notranslate"><span class="pre">EvenniaTestCase.tearDown()</span></code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.BaseEvenniaTest"><code class="docutils literal notranslate"><span class="pre">BaseEvenniaTest</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTest"><code class="docutils literal notranslate"><span class="pre">EvenniaTest</span></code></a><ul>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTest.account_typeclass"><code class="docutils literal notranslate"><span class="pre">EvenniaTest.account_typeclass</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTest.object_typeclass"><code class="docutils literal notranslate"><span class="pre">EvenniaTest.object_typeclass</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTest.character_typeclass"><code class="docutils literal notranslate"><span class="pre">EvenniaTest.character_typeclass</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTest.exit_typeclass"><code class="docutils literal notranslate"><span class="pre">EvenniaTest.exit_typeclass</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTest.room_typeclass"><code class="docutils literal notranslate"><span class="pre">EvenniaTest.room_typeclass</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaTest.script_typeclass"><code class="docutils literal notranslate"><span class="pre">EvenniaTest.script_typeclass</span></code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.BaseEvenniaCommandTest"><code class="docutils literal notranslate"><span class="pre">BaseEvenniaCommandTest</span></code></a></li>
|
||
<li><a class="reference internal" href="#evennia.utils.test_resources.EvenniaCommandTest"><code class="docutils literal notranslate"><span class="pre">EvenniaCommandTest</span></code></a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<div>
|
||
<h4>Previous topic</h4>
|
||
<p class="topless"><a href="evennia.utils.search.html"
|
||
title="previous chapter">evennia.utils.search</a></p>
|
||
</div>
|
||
<div>
|
||
<h4>Next topic</h4>
|
||
<p class="topless"><a href="evennia.utils.text2html.html"
|
||
title="next chapter">evennia.utils.text2html</a></p>
|
||
</div>
|
||
<div role="note" aria-label="source link">
|
||
<!--h3>This Page</h3-->
|
||
<ul class="this-page-menu">
|
||
<li><a href="../_sources/api/evennia.utils.test_resources.md.txt"
|
||
rel="nofollow">Show Page Source</a></li>
|
||
</ul>
|
||
</div><h3>Links</h3>
|
||
<ul>
|
||
<li><a href="https://www.evennia.com/docs/latest/index.html">Documentation Top</a> </li>
|
||
<li><a href="https://www.evennia.com">Evennia Home</a> </li>
|
||
<li><a href="https://github.com/evennia/evennia">Github</a> </li>
|
||
<li><a href="http://games.evennia.com">Game Index</a> </li>
|
||
<li>
|
||
<a href="https://discord.gg/AJJpcRUhtF">Discord</a> -
|
||
<a href="https://github.com/evennia/evennia/discussions">Discussions</a> -
|
||
<a href="https://evennia.blogspot.com/">Blog</a>
|
||
</li>
|
||
</ul>
|
||
<h3>Doc Versions</h3>
|
||
<ul>
|
||
|
||
<li>
|
||
<a href="https://www.evennia.com/docs/latest/index.html">latest (main branch)</a>
|
||
</li>
|
||
|
||
|
||
<li>
|
||
<a href="https://www.evennia.com/docs/5.x/index.html">v5.0.0 branch (outdated)</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="https://www.evennia.com/docs/4.x/index.html">v4.0.0 branch (outdated)</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="https://www.evennia.com/docs/3.x/index.html">v3.0.0 branch (outdated)</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="https://www.evennia.com/docs/2.x/index.html">v2.0.0 branch (outdated)</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="https://www.evennia.com/docs/1.x/index.html">v1.0.0 branch (outdated)</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="https://www.evennia.com/docs/0.x/index.html">v0.9.5 branch (outdated)</a>
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="clearer"></div>
|
||
</div>
|
||
<div class="related" role="navigation" aria-label="Related">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="../genindex.html" title="General Index"
|
||
>index</a></li>
|
||
<li class="right" >
|
||
<a href="../py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="evennia.utils.text2html.html" title="evennia.utils.text2html"
|
||
>next</a> |</li>
|
||
<li class="right" >
|
||
<a href="evennia.utils.search.html" title="evennia.utils.search"
|
||
>previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="../index.html">Evennia</a> »</li>
|
||
<li class="nav-item nav-item-1"><a href="../Evennia-API.html" >API Summary</a> »</li>
|
||
<li class="nav-item nav-item-2"><a href="evennia-api.html" >evennia</a> »</li>
|
||
<li class="nav-item nav-item-3"><a href="evennia.html" >evennia</a> »</li>
|
||
<li class="nav-item nav-item-4"><a href="evennia.utils.html" >evennia.utils</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">evennia.utils.test_resources</a></li>
|
||
</ul>
|
||
</div>
|
||
<div class="footer" role="contentinfo">
|
||
© Copyright 2024, The Evennia developer community.
|
||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.2.3.
|
||
</div>
|
||
</body>
|
||
</html> |