How to use the tomcatmanager.models.TomcatApplication 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_directory_and_version_empty():
    ta = tm.models.TomcatApplication()
    assert ta.directory_and_version is None
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'
github tomcatmanager / tomcatmanager / tests / test_models.py View on Github external
def test_str_without_version():
    line = '/shiny:running:8:shiny'
    ta = tm.models.TomcatApplication()
    ta.parse(line)
    assert str(ta) == line
github tomcatmanager / tomcatmanager / tests / test_models.py View on Github external
def test_str_with_version():
    line = '/shiny:stopped:17:shiny##v2.0.6'
    ta = tm.models.TomcatApplication()
    ta.parse(line)
    assert str(ta) == line