How to use the tomcatmanager.application_states.stopped 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_version():
    line = '/shiny:stopped:17:shiny##v2.0.6'
    ta = tm.models.TomcatApplication()
    ta.parse(line)
    assert ta.path == '/shiny'
    assert ta.state == tm.application_states.stopped
    assert ta.sessions == 17
    assert ta.directory == 'shiny'
    assert ta.version == 'v2.0.6'
    assert ta.directory_and_version == 'shiny##v2.0.6'