def test_segments_error(header):
    try:
        segm = Segments(header)
    except ValueError:
        return

    with pytest.raises(OSError):
        segm.all(order='upper')
Exemple #2
0
def test_segments_crud(header):
    segm = Segments(header)
    all_segm, meta = segm.all()

    assert len(all_segm) == meta.pagination.count
    assert len(all_segm) == segm.count()

    all_segm, meta = segm.all(as_json=True)

    assert len(all_segm)
    assert 'pagination' in meta.keys()
def test_segments_crud(header):
    try:
        segm = Segments(header)
    except ValueError:
        return

    all_segm, meta = segm.all()

    assert len(all_segm) == meta.pagination.count
    assert len(all_segm) == segm.count()

    all_segm, meta = segm.all(as_json=True)

    assert len(all_segm)
    assert 'pagination' in meta.keys()
Exemple #4
0
def test_segments_error(header):
    segm = Segments(header)

    with pytest.raises(OSError):
        segm.all(order='upper')