def test_check_pairs_ok(phone, email, first_name, last_name, gender, birthday): user_info = OnlineScoreRequest(phone=phone, email=email, first_name=first_name, last_name=last_name, gender=gender, birthday=birthday) assert check_pairs(user_info)
def test_calculate_score_request(self, arguments, score): self.add_key_to_hash_key(arguments) online_request = OnlineScoreRequest(self.store, self.context, arguments["arguments"]) self.assertEqual(online_request.process(), ({"score": score}, OK))
def test_bad_init_online_score_request(self, arguments): with self.assertRaises(TooLessInformationError): OnlineScoreRequest(self.store, self.context, arguments["arguments"])
def test_init_online_score_request(self, arguments, has): OnlineScoreRequest(self.store, self.context, arguments["arguments"]) self.assertSetEqual(set(self.context["has"]), set(has))
def score_request(): return OnlineScoreRequest(request_body={"test_body": "test"})
def test_online_score_fields_ok(arguments): meth_req = type("MethodRequest", (object, ), {"arguments": arguments})() interests = OnlineScoreRequest(meth_req, {}, {}) interests.parse_request() assert interests.valid