def test_400_answer(self): """ Это тест корректного разбора ответа 400 """ self.assertEqual(process_answer({ RESPONSE: 400, ERROR: 'Bad Request' }), '400 : Bad Request')
def test_response_400(self): self.assertEqual(process_answer({ RESPONSE: 400, ERROR: 'Bad Request' }), self.bad_response)
def test_response_200(self): self.assertEqual(process_answer({RESPONSE: 200}), self.response_ok)
def test_process_answer_400(self): self.assertEqual( process_answer( b'{\n "response": 400,\n "error": "Bad Request"\n}'), '400 : Bad Request')
def test_process_answer_200(self): self.assertEqual(process_answer(b'{\n "response": 200\n}'), '200 : OK')
def test_process_answer_res_400(self): self.assertEqual(process_answer({ RESPONSE: 400, ERROR: 'Bad Request' }), f'400 : Bad Request')
def test_process_answer_res_200(self): self.assertEqual(process_answer({RESPONSE: 200}), '200 : OK')
def test_process_answer_res_400(self): """Тест корректного разбора 400""" self.assertEqual(process_answer({ RESPONSE: 400, ERROR: 'Bad Request' }), f'400 : Bad Request')
def test_process_answer_res_200(self): """Тест корректтного разбора ответа 200""" self.assertEqual(process_answer({RESPONSE: 200}), '200 : OK')
def test_response_400(self): """Тест на код 400""" self.assertEqual(process_answer({ RESPONSE: 400, ERROR: 'Bad request' }), '400 : Bad request')
def test_response_200(self): """Тест на код 200""" self.assertEqual(process_answer({RESPONSE: 200}), '200 : OK')