Expanded command test-suite functionality and added basic testing methods for commands in "System" category.

This commit is contained in:
Griatch 2011-02-21 17:47:02 +00:00
parent 5464487c93
commit ef59b97881
2 changed files with 57 additions and 10 deletions

View file

@ -126,7 +126,7 @@ def gametime(format=False):
"""
try:
script = ScriptDB.objects.get_all_scripts(GAME_TIME_SCRIPT)[0]
except KeyError:
except (KeyError, IndexError):
logger.log_trace("GameTime script not found.")
return
# we return this as an integer (second-precision is good enough)
@ -141,7 +141,7 @@ def runtime(format=False):
"""
try:
script = ScriptDB.objects.get_all_scripts(GAME_TIME_SCRIPT)[0]
except KeyError:
except (KeyError, IndexError):
logger.log_trace("GameTime script not found.")
return
# we return this as an integer (second-precision is good enough)
@ -156,7 +156,7 @@ def uptime(format=False):
"""
try:
script = ScriptDB.objects.get_all_scripts(GAME_TIME_SCRIPT)[0]
except KeyError:
except (KeyError, IndexError):
logger.log_trace("GameTime script not found.")
return
# we return this as an integer (second-precision is good enough)