def setUp(self): self.u1 = u_helper.create_normal_user('U1') self.s1 = u_helper.create_super_user('S1') self.g1 = u_helper.create_group('G1') self.c1 = helper.create_category('C1') self.b1 = helper.create_board('B1', 'C1') self.b2 = helper.create_board('B2', 'C1')
def setUp(self): self.c = helper.create_category('C1') self.b = helper.create_board('B1', 'C1') self.u = u_helper.create_normal_user('U1') self.g = u_helper.create_group('G1') self.t = helper.create_thread('T1', 'B1', 'C1')
def test_board_with_enabled_groups_returns_403(self): """ If a user without the required groups tries to open a board, it should return 403. """ g1 = u_helper.create_group('G1') self.b1.enabled_groups.add(g1) response = self.client.get(self.b1.get_absolute_url()) self.assertContains(response, '', status_code=403)