How to use the tomcatmanager.models.TomcatManagerResponse 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.py View on Github external
def test_connect_auth(self, tomcat_manager_server):
        tomcat = tm.TomcatManager()
        r = tomcat.connect(
            tomcat_manager_server.url,
            tomcat_manager_server.user,
            tomcat_manager_server.password
        )
        assert isinstance(r, tm.models.TomcatManagerResponse)
        assert r.status_code == tm.status_codes.ok
        assert tomcat.is_connected
        assert r.result == ''
        assert r.status_message == ''
        r.raise_for_status()