def _generate_groups(self): group1 = Group.Group("group 1") group11 = Group.Group("group 1.1") group12 = Group.Group("group 1.2") group2 = Group.Group("group 2") group1.add_child(group11) group1.add_child(group12) return group1, group2
def test_get_full_name(self): group1 = Group.Group("group 1") group12 = Group.Group("group 1.2") group121 = Group.Group("group 1.2.1") group12.add_child(group121) group1.add_child(group12) self.assertEquals(group1.get_full_name(), "group 1") self.assertEquals(group12.get_full_name(), "group 1 > group 1.2") self.assertEquals(group121.get_full_name(), "group 1 > group 1.2 > group 1.2.1")
def __init__(self): self.experiments_allowed = [ generate_experiment_allowed(100, 'ud-dummy', 'Dummy experiments') ] self.groups = [Group.Group("5A")] self.experiments = [ generate_experiment('ud-dummy', 'Dummy experiments') ] self.experiment_uses = [ generate_experiment_use("student2", self.experiments[0]) ], 1 self.users = [ User.User("admin1", "Admin Test User", "*****@*****.**", Role.Role("administrator")) ] self.roles = [ Role.Role("student"), Role.Role("instructor"), Role.Role("administrator") ]