| 208 | |
| 209 | |
| 210 | def test_list(repo_fixtures, request): |
| 211 | with get_repository_from_fixture(repo_fixtures, request) as repository: |
| 212 | for x in range(100): |
| 213 | repository.put(H(x), fchunk(b"SOMEDATA")) |
| 214 | repository.commit(compact=False) |
| 215 | repo_list = repository.list() |
| 216 | assert len(repo_list) == 100 |
| 217 | first_half = repository.list(limit=50) |
| 218 | assert len(first_half) == 50 |
| 219 | assert first_half == repo_list[:50] |
| 220 | second_half = repository.list(marker=first_half[-1]) |
| 221 | assert len(second_half) == 50 |
| 222 | assert second_half == repo_list[50:] |
| 223 | assert len(repository.list(limit=50)) == 50 |
| 224 | |
| 225 | |
| 226 | def test_max_data_size(repo_fixtures, request): |