Пример #1
0
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 = views.cohorts_index({}, pyramid_request)
    assert len(result["results"]) == 2
Пример #2
0
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 = views.cohorts_index({}, pyramid_request)
    assert len(result["results"]) == 2
Пример #3
0
def test_cohorts_index_with_cohorts(req):
    cohort1 = models.FeatureCohort(name='cohort1')
    cohort2 = models.FeatureCohort(name='cohort2')
    req.db.add(cohort1)
    req.db.add(cohort2)
    req.db.flush()

    result = views.cohorts_index({}, req)
    assert len(result["results"]) == 2
Пример #4
0
def test_cohorts_index_with_cohorts():
    req = DummyRequest(db=db.Session)
    cohort1 = models.FeatureCohort(name='cohort1')
    cohort2 = models.FeatureCohort(name='cohort2')
    db.Session.add(cohort1)
    db.Session.add(cohort2)
    db.Session.flush()

    result = views.cohorts_index({}, req)
    assert len(result["results"]) == 2
Пример #5
0
def test_cohorts_index_with_cohorts():
    req = DummyRequest(db=db.Session)
    cohort1 = models.FeatureCohort(name='cohort1')
    cohort2 = models.FeatureCohort(name='cohort2')
    db.Session.add(cohort1)
    db.Session.add(cohort2)
    db.Session.flush()

    result = views.cohorts_index({}, req)
    assert len(result["results"]) == 2
Пример #6
0
def test_cohorts_index_without_cohorts(pyramid_request):
    result = views.cohorts_index({}, pyramid_request)
    assert result["results"] == []
Пример #7
0
def test_cohorts_index_without_cohorts(pyramid_request):
    result = views.cohorts_index({}, pyramid_request)
    assert result["results"] == []
Пример #8
0
def test_cohorts_index_without_cohorts():
    req = DummyRequest(db=db.Session)
    result = views.cohorts_index({}, req)
    assert result["results"] == []
Пример #9
0
def test_cohorts_index_without_cohorts():
    req = DummyRequest(db=db.Session)
    result = views.cohorts_index({}, req)
    assert result["results"] == []
Пример #10
0
def test_cohorts_index_without_cohorts(req):
    result = views.cohorts_index({}, req)
    assert result["results"] == []