How to use the tomcatmanager.models.ServerInfo 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_manager_info.py View on Github external
def test_server_info(self, tomcat):
        r = tomcat.server_info()
        self.info_assertions(r)
        assert isinstance(r.server_info, tm.models.ServerInfo)
github tomcatmanager / tomcatmanager / tests / test_models.py View on Github external
def test_properties(server_info):
    sinfo = tm.models.ServerInfo(server_info)
    assert sinfo.tomcat_version == 'Apache Tomcat/8.0.32 (Ubuntu)'
    assert sinfo.os_name == 'Linux'
    assert sinfo.os_version == '4.4.0-89-generic'
    assert sinfo.os_architecture == 'amd64'
    assert sinfo.jvm_version == '1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11'
    assert sinfo.jvm_vendor == 'Oracle Corporation'
github tomcatmanager / tomcatmanager / tests / test_models.py View on Github external
def test_dict(server_info):
    sinfo = tm.models.ServerInfo(server_info)
    assert sinfo['Tomcat Version'] == 'Apache Tomcat/8.0.32 (Ubuntu)'
    assert sinfo['OS Name'] == 'Linux'
    assert sinfo['OS Version'] == '4.4.0-89-generic'
    assert sinfo['OS Architecture'] == 'amd64'
    assert sinfo['JVM Version'] == '1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11'
    assert sinfo['JVM Vendor'] == 'Oracle Corporation'
github tomcatmanager / tomcatmanager / tests / test_models.py View on Github external
def test_parse_extra(server_info):
    lines = server_info + "New Key: New Value\n"
    sinfo = tm.models.ServerInfo(lines)
    assert sinfo['New Key'] == 'New Value'