def setup_cohort_service():
    if request.endpoint is not None:
        if request.path.startswith('/cohorts'):
            cohort_service = getattr(g, 'cohort_service', None)
            tag_service = getattr(g, 'tag_service', None)
            centralauth_service = getattr(g, 'centralauth_service', None)
            if cohort_service is None:
                g.cohort_service = CohortService()
            if tag_service is None:
                g.tag_service = TagService()
            if centralauth_service is None:
                g.centralauth_service = CentralAuthService()
 def setUp(self):
     DatabaseTest.setUp(self)
     self.tag_service = TagService()
 def test_get_all_tags_empty(self):
     self.tag_service = TagService()
     tags = self.tag_service.get_all_tags(self.session)
     assert_equal(tags, [])