def test(self): bootstrap = Bootstrap(server='127.0.0.2') bootstrap.start_test() try: self.failUnless(bootstrap.server_connection_failure()) self.failIf(bootstrap.error) except AssertionError as assertion: print 'Output: %s' % bootstrap.output print 'Error: %s' % bootstrap.error raise_exception(assertion) finally: bootstrap.end_test()
def test(self): bootstrap = Bootstrap(server='127.0.0.2') bootstrap.start_test() try: self.failUnless(bootstrap.server_connection_failure()) self.failIf(bootstrap.error) except AssertionError as assertion: print 'Output: %s' % bootstrap.output print 'Error: %s' % bootstrap.error raise_exception(assertion) finally: bootstrap.end_test()
def test_definition_missing(self): bootstrap = Bootstrap() bootstrap.ztps.set_config_response() bootstrap.ztps.set_node_check_response() bootstrap.start_test() try: self.failUnless(bootstrap.eapi_node_information_collected()) self.failUnless(bootstrap.server_connection_failure()) self.failIf(bootstrap.error) except AssertionError as assertion: print 'Output: %s' % bootstrap.output print 'Error: %s' % bootstrap.error raise assertion finally: bootstrap.end_test()
def test_definition_missing(self): bootstrap = Bootstrap() bootstrap.ztps.set_config_response() bootstrap.ztps.set_node_check_response() bootstrap.start_test() try: self.failUnless(bootstrap.eapi_node_information_collected()) self.failUnless(bootstrap.server_connection_failure()) self.failIf(bootstrap.error) except AssertionError as assertion: print 'Output: %s' % bootstrap.output print 'Error: %s' % bootstrap.error raise_exception(assertion) finally: bootstrap.end_test()