Metadata-Version: 2.4
Name: pytest-testing-files-generator
Version: 0.6.0rc1
Summary: pytest plugin for testing-files-generator: real files of exact sizes and formats for tests, and what the system under test should do with each one.
Author: DonislawDev
License-Expression: MPL-2.0
License-File: LICENSE
Keywords: pytest,pytest-plugin,test files,fixtures,file upload,upload testing,qa
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Testing
Project-URL: Homepage, https://github.com/donislawdev/TestingFilesGenerator/tree/main/python/testing-files-generator#readme
Project-URL: Source, https://github.com/donislawdev/TestingFilesGenerator
Project-URL: Issues, https://github.com/donislawdev/TestingFilesGenerator/issues
Requires-Python: >=3.10
Requires-Dist: testing-files-generator==0.6.0rc1
Requires-Dist: pytest>=8
Description-Content-Type: text/markdown

# pytest-testing-files-generator

The pytest plugin of [testing-files-generator](https://pypi.org/project/testing-files-generator/): real files of exact sizes and formats for your tests, and what the system under test should do with each one.

This package has no code of its own. It installs testing-files-generator of the same version, and pytest loads its plugin on its own. Installing either package gives the same thing:

```bash
pip install pytest-testing-files-generator
```

```python
import re

import pytest
from playwright.sync_api import expect
from testing_files_generator import file_set

uploads = file_set(preset="upload-validation", options={"limit": "2mb", "bulk": 0})


@pytest.mark.parametrize("file", uploads.params())
def test_upload(file, page):
    page.goto("/upload")
    page.get_by_label("File").set_input_files(file.path())
    page.get_by_role("button", name="Upload").click()
    status = page.get_by_role("status")
    expect(status).to_have_text(re.compile("Uploaded|Refused"))
    file.check("accept" if "Uploaded" in status.text_content() else "reject")
```

Everything else is in [the README of testing-files-generator](https://github.com/donislawdev/TestingFilesGenerator/tree/main/python/testing-files-generator#readme).

This package is under the Mozilla Public License 2.0, in LICENSE.
