示例#1
0
    def test_group_creation(self):
        for signup in randata.random_data(1000):
            signup_model.create_or_update_signup(**signup)

        
        group_data = models.prepare_groups(1)
        models.create_groups(group_data, 1)
        groups = group_model.get_groups(1)

        self.assertEqual(len(group_data), len(groups))
示例#2
0
    def test_group_creation(self):
        for signup in randata.random_data(1000):
            signup_model.create_or_update_signup(**signup)

        group_data = models.prepare_groups(1)
        models.create_groups(group_data, 'g-')
        groups = group_model.get_groups()

        self.assertEqual(len(group_data), len(groups))
        for i, member in enumerate(groups[0]['members']):
            self.assertEqual(member, group_data[0]['members'][i]['email'])
示例#3
0
    def test_group_creation(self):
        for signup in randata.random_signup(1000):
            signup_model.create_or_update_signup(**signup)

        group_data = models.prepare_groups()
        models.create_groups(group_data, 'g-')
        groups = group_model.get_groups()

        self.assertEqual(len(group_data), len(groups))
        for i, member in enumerate(groups[0]['members']):
            self.assertEqual(member, group_data[0]['members'][i]['email'])