def test_is_new_session_throws_exception_if_session_not_exists(self): test_input = HandlerInput(request_envelope=RequestEnvelope()) with self.assertRaises( TypeError, msg="is_new_session method didn't throw TypeError when an " "input request without session is passed"): is_new_session(handler_input=test_input)
def test_is_new_session(self): test_input = self._create_handler_input( request=self.test_launch_request) self.assertEqual( is_new_session(handler_input=test_input), self.test_new_session, "is_new_session method returned incorrect session information " "from input request when a session exists")