def setUp(self,*args): super(TestNormalAdminAddBlackApi, self).setUp(user_id=self.user_id,anchor_id=self.anchor_id) del_super_visor_api = DelSuperVisorApi(self.anchor_login_name) del_super_visor_api.get({'user_id': self.normal_admin_user_id, 'anchor_id': self.anchor_id}) TearDown().guard_teardown(user_id=self.user_id, anchor_id=self.anchor_id) MysqlOperation(user_id=self.user_id).clean_black_user() Redis().clean_black_user(self.anchor_id)
def setUp(self,*args): super(TestHighAdminAddBlackApi, self).setUp(user_id=self.user_id) del_super_visor_api = DelSuperVisorApi(self.anchor_login_name) del_super_visor_api.get({'user_id': self.high_admin_user_id, 'anchor_id': self.anchor_id}) MysqlOperation(user_id=self.user_id).clean_user_noble().clean_black_user() # RedisHold().clean_redis_user_detail(self.user_id) Redis().clean_black_user(self.anchor_id)
def tearDown(self, *args): super(TestSuperVisorApi, self).tearDown() del_super_visor_api = DelSuperVisorApi(self.anchor_login_name) del_super_visor_api.get({ 'user_id': self.user_id, 'anchor_id': self.anchor_id })
def add_black_teardown(self, anchor_login_name, user_id, anchor_id, other_anchor_id): del_super_visor_api = DelSuperVisorApi(anchor_login_name) del_super_visor_api.get({'user_id': user_id, 'anchor_id': anchor_id}) for x in [user_id, other_anchor_id]: MysqlOperation(user_id=x).clean_black_user() Redis().clean_black_user(anchor_id) time.sleep(1)
def setUp(self,*args): super(TestNormalAdminAddBlackApi,self).setUp() for x in [self.user_id,self.high_admin_user_id]: del_super_visor_api = DelSuperVisorApi(self.anchor_login_name) del_super_visor_api.get({'user_id': x, 'anchor_id': self.anchor_id}) for x in [self.user_id,self.other_anchor_id]: MysqlOperation(user_id=x).clean_black_user() Redis().clean_black_user(self.anchor_id) RedisHold().clean_redis_user_detail(self.user_id)
def tearDown(self,*args): super(TestNormalAdminAddBlackApi, self).tearDown(user_id=self.user_id,anchor_id=self.anchor_id) del_super_visor_api = DelSuperVisorApi(self.anchor_login_name) del_super_visor_api.get({'user_id': self.normal_admin_user_id, 'anchor_id': self.anchor_id}) TearDown().guard_teardown(user_id=self.user_id, anchor_id=self.anchor_id) MysqlOperation(user_id=self.user_id).clean_black_user() Redis().clean_black_user(self.anchor_id) # RedisHold().clean_redis_user_detail(self.user_id) # time.sleep(self.time_sleep)
def tearDown(self, *args): super(TestAnchorAddBlackApi, self).tearDown() del_super_visor_api = DelSuperVisorApi(self.anchor_login_name) del_super_visor_api.get({ 'user_id': self.user_id, 'anchor_id': self.anchor_id }) for x in [self.user_id, self.other_anchor_id]: MysqlOperation(user_id=x).clean_black_user() Redis().clean_black_user(self.anchor_id) RedisHold().clean_redis_user_detail(self.user_id)