Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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'