How to use the tomcatmanager.application_states.running function in tomcatmanager

To help you get started, we’ve selected a few tomcatmanager examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tomcatmanager / tomcatmanager / tests / test_models.py View on Github external
def test_parse_app_with_slash_in_directory():
    line = '/manager:running:0:/usr/share/tomcat8-admin/manager'
    ta = tm.models.TomcatApplication()
    ta.parse(line)
    assert ta.path == '/manager'
    assert ta.state == tm.application_states.running
    assert ta.sessions == 0
    assert ta.directory == '/usr/share/tomcat8-admin/manager'
    assert ta.version is None
    assert ta.directory_and_version == ta.directory