Fix unit test issue with server name when running from mygame settings

This commit is contained in:
Griatch 2019-03-20 00:41:23 +01:00
parent 0de0a71026
commit 75b5dd43d7
2 changed files with 4 additions and 2 deletions

View file

@ -27,14 +27,15 @@ before_install:
install: install:
- pip install psycopg2-binary - pip install psycopg2-binary
- pip install mysqlclient - pip install mysqlclient
- pip install -e .
- pip install coveralls - pip install coveralls
- pip install -e .
before_script: before_script:
- evennia --init testing_mygame - evennia --init testing_mygame
- cp .travis/${TESTING_DB}_settings.py testing_mygame/server/conf/settings.py - cp .travis/${TESTING_DB}_settings.py testing_mygame/server/conf/settings.py
- cd testing_mygame - cd testing_mygame
- evennia migrate - evennia migrate
- evennia collectstatic
script: script:
- coverage run --source=../evennia --omit=*/migrations/*,*/urls.py,*/test*.py,*.sh,*.txt,*.md,*.pyc,*.service ../bin/unix/evennia test --settings=settings evennia - coverage run --source=../evennia --omit=*/migrations/*,*/urls.py,*/test*.py,*.sh,*.txt,*.md,*.pyc,*.service ../bin/unix/evennia test --settings=settings evennia

View file

@ -2,6 +2,7 @@
Module containing the test cases for the Audit system. Module containing the test cases for the Audit system.
""" """
from anything import Anything
from django.test import override_settings from django.test import override_settings
from django.conf import settings from django.conf import settings
from evennia.utils.test_resources import EvenniaTest from evennia.utils.test_resources import EvenniaTest
@ -85,7 +86,7 @@ class AuditingTest(EvenniaTest):
self.assertEqual(obj, { self.assertEqual(obj, {
'direction': 'RCV', 'direction': 'RCV',
'protocol': 'telnet', 'protocol': 'telnet',
'application': 'Evennia', 'application': Anything, # this will change if running tests from the game dir
'text': 'hello' 'text': 'hello'
}) })