def testSimpleGroupMigration(self):

        # Clear out previous projects.
        for project in api_base.entity_get_all(Project):
            api_base.entity_hard_delete(Project, project.id)

        projects_loader.do_load_models('./etc/projects.yaml.sample')

        all_groups = api_base.entity_get_all(ProjectGroup)
        all_projects = api_base.entity_get_all(Project)
        self.assertEqual(3, len(all_groups))
        self.assertEqual(2, len(all_projects))

        for project in all_projects:
            branches = api_base.entity_get_count(Branch,
                                                 project_id=project.id,
                                                 name='master')
            self.assertEqual(1, branches)
Exemple #2
0
    def testSimpleGroupMigration(self):

        # Clear out previous projects.
        for project in api_base.entity_get_all(Project):
            api_base.entity_hard_delete(Project, project.id)

        projects_loader.do_load_models('./etc/projects.yaml.sample')

        all_groups = api_base.entity_get_all(ProjectGroup)
        all_projects = api_base.entity_get_all(Project)
        self.assertEqual(3, len(all_groups))
        self.assertEqual(2, len(all_projects))

        for project in all_projects:
            branches = api_base.entity_get_count(Branch,
                                                 project_id=project.id,
                                                 name='master')
            self.assertEqual(1, branches)
def project_group_get_count(**kwargs):
    return api_base.entity_get_count(models.ProjectGroup, **kwargs)
def events_get_count(**kwargs):
    return api_base.entity_get_count(models.TimeLineEvent,
                                     **kwargs)
Exemple #5
0
def user_get_count(**kwargs):
    return api_base.entity_get_count(models.User, **kwargs)
Exemple #6
0
def team_get_count(**kwargs):
    return api_base.entity_get_count(models.Team, **kwargs)
def events_get_count(**kwargs):
    return api_base.entity_get_count(models.TimeLineEvent, **kwargs)
Exemple #8
0
def milestone_get_count(**kwargs):
    return api_base.entity_get_count(models.Milestone, **kwargs)
Exemple #9
0
def team_get_count(**kwargs):
    return api_base.entity_get_count(models.Team, **kwargs)
Exemple #10
0
def tag_get_count(**kwargs):
    return api_base.entity_get_count(models.StoryTag, **kwargs)
Exemple #11
0
def tag_get_count(**kwargs):
    return api_base.entity_get_count(models.StoryTag, **kwargs)
def subscription_get_count(**kwargs):
    return api_base.entity_get_count(models.Subscription, **kwargs)
Exemple #13
0
def subscription_events_get_count(**kwargs):
    return api_base.entity_get_count(models.SubscriptionEvents, **kwargs)
Exemple #14
0
def user_get_count(**kwargs):
    return api_base.entity_get_count(models.User, **kwargs)
Exemple #15
0
def milestone_get_count(**kwargs):
    return api_base.entity_get_count(models.Milestone, **kwargs)
Exemple #16
0
def get_count(**kwargs):
    return api_base.entity_get_count(models.Worklist, **kwargs)