def test_case01_Acc(self): tel = 13312345673 score = 1000 act_mem = MemberHelper.score_acc(tel, score) exp_mem = 1 self.assertEqual(exp_mem, act_mem)
def test_case02_getdefaultdisc(self): print('6.test case02') tel = '13312345672' act_disc = MemberHelper.get_member_discount(tel) exp_disc = 0.8 self.assertEqual(exp_disc, act_disc)
def test_case05_Last_msg(self): tel_last = -5672 act_msg = MemberHelper.member_get(tel_last) exp_msg = False self.assertEqual(exp_msg, act_msg)
def test_case07_Modify(self): tel=133123456789 disc=-1 act_mem=MemberHelper.member_mod(tel,disc) exp_mem=False self.assertEqual(exp_mem, act_mem)
def test_case02_Modify(self): tel=13312345674 disc=0 act_mem=MemberHelper.member_mod(tel,disc) exp_mem=1 self.assertEqual(exp_mem, act_mem)
def test_case08_Add(self): tel=13312345675 act_msg=MemberHelper.add_member_by_tel(tel) exp_msg=1 self.assertEqual(exp_msg, act_msg)
def test_case07_Add(self): tel=-1000 act_msg=MemberHelper.add_member_by_tel(tel) exp_msg=1 self.assertEqual(exp_msg, act_msg)