Exemplo n.º 1
0
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)
Exemplo n.º 2
0
 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))
Exemplo n.º 3
0
 def test_bad_init_online_score_request(self, arguments):
     with self.assertRaises(TooLessInformationError):
         OnlineScoreRequest(self.store, self.context,
                            arguments["arguments"])
Exemplo n.º 4
0
 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"})
Exemplo n.º 6
0
def test_online_score_fields_ok(arguments):
    meth_req = type("MethodRequest", (object, ), {"arguments": arguments})()
    interests = OnlineScoreRequest(meth_req, {}, {})
    interests.parse_request()
    assert interests.valid