diff options
| author | Azul <azul@leap.se> | 2014-04-16 11:14:55 +0200 | 
|---|---|---|
| committer | Azul <azul@leap.se> | 2014-04-17 10:39:59 +0200 | 
| commit | 0f0057e65c6bfcb98ce53e1a48aa1460d3a6716a (patch) | |
| tree | 012b992f23713788ac2e4474266f95d2c33df144 /test/nagios/nagios_report.py | |
| parent | 73bdb9a9ea8932e9a14f996391d348690da1a63c (diff) | |
move support classes into their own package
now the webapp_login test looks nice and clean. soledad next.
Diffstat (limited to 'test/nagios/nagios_report.py')
| -rw-r--r-- | test/nagios/nagios_report.py | 24 | 
1 files changed, 0 insertions, 24 deletions
| diff --git a/test/nagios/nagios_report.py b/test/nagios/nagios_report.py deleted file mode 100644 index 13cd551..0000000 --- a/test/nagios/nagios_report.py +++ /dev/null @@ -1,24 +0,0 @@ -def functions_for_system(under_test): -    """ -    returns a set of functions to use for nagios reporting: -    >>> ok, warn, critical, unknown = functions_for_system("tested system") -     -    each of them will print a nagios line with its argument and -    return the exit code: -    >>> warn("that looks strange") -    1 tested system - WARNING - that looks strange -    1 -    """ -    def report_function(code): -        return lambda message : report(under_test, code, message) -    return map(report_function, [0,1,2,3]) - -def report(system, code, message): -    codes = {0: 'OK', 1: 'WARNING', 2: 'CRITICAL', 3: 'UNKNOWN'} -    print "%d %s - %s - %s" % \ -        (code, system, codes[code], message) -    return code - -if __name__ == "__main__": -    import doctest -    doctest.testmod() | 
