def test_cohorts_index_with_cohorts(pyramid_request): cohort1 = models.FeatureCohort(name="cohort1") cohort2 = models.FeatureCohort(name="cohort2") pyramid_request.db.add(cohort1) pyramid_request.db.add(cohort2) pyramid_request.db.flush() result = cohorts_index({}, pyramid_request) assert len(result["results"]) == 2
def test_cohorts_index_with_cohorts(pyramid_request): cohort1 = models.FeatureCohort(name="cohort1") cohort2 = models.FeatureCohort(name="cohort2") pyramid_request.db.add(cohort1) pyramid_request.db.add(cohort2) pyramid_request.db.flush() result = cohorts_index({}, pyramid_request) assert len(result["results"]) == 2
def test_cohorts_index_without_cohorts(pyramid_request): result = cohorts_index({}, pyramid_request) assert result["results"] == []
def test_cohorts_index_without_cohorts(pyramid_request): result = cohorts_index({}, pyramid_request) assert result["results"] == []