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)
def user_get_count(**kwargs): return api_base.entity_get_count(models.User, **kwargs)
def team_get_count(**kwargs): return api_base.entity_get_count(models.Team, **kwargs)
def milestone_get_count(**kwargs): return api_base.entity_get_count(models.Milestone, **kwargs)
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)
def subscription_events_get_count(**kwargs): return api_base.entity_get_count(models.SubscriptionEvents, **kwargs)
def get_count(**kwargs): return api_base.entity_get_count(models.Worklist, **kwargs)