Exemplo n.º 1
0
def test_segments_error(header):
    try:
        segm = Segments(header)
    except ValueError:
        return

    with pytest.raises(OSError):
        segm.all(order='upper')
Exemplo n.º 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()
Exemplo n.º 3
0
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()
Exemplo n.º 4
0
def test_segments_error(header):
    segm = Segments(header)

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