示例#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)
示例#2
0
文件: test.py 项目: antik9/python-edu
 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))
示例#3
0
文件: test.py 项目: antik9/python-edu
 def test_bad_init_online_score_request(self, arguments):
     with self.assertRaises(TooLessInformationError):
         OnlineScoreRequest(self.store, self.context,
                            arguments["arguments"])
示例#4
0
文件: test.py 项目: antik9/python-edu
 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"})
示例#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