def test_check_status2(self): json_results = { 'State': {'Status': 'stopped'}, } with patch('check_docker.get_url', return_value=json_results): check_docker.check_status(container='container', desired_state='running') self.assertEqual(check_docker.rc, check_docker.CRITICAL_RC)
def test_check_status5(self): json_results = { 'State': { 'foo': False }, } with patch('check_docker.get_url', return_value=json_results): check_docker.check_status(container='container', desired_state='running') self.assertEqual(check_docker.rc, check_docker.UNKNOWN_RC)