python-getpaid-simulator 3.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. python_getpaid_simulator-3.0.0/.github/release-drafter.yml +31 -0
  2. python_getpaid_simulator-3.0.0/.github/workflows/ci.yml +58 -0
  3. python_getpaid_simulator-3.0.0/.github/workflows/release.yml +70 -0
  4. python_getpaid_simulator-3.0.0/.gitignore +20 -0
  5. python_getpaid_simulator-3.0.0/.pre-commit-config.yaml +15 -0
  6. python_getpaid_simulator-3.0.0/.python-version +1 -0
  7. python_getpaid_simulator-3.0.0/.readthedocs.yml +12 -0
  8. python_getpaid_simulator-3.0.0/CODE_OF_CONDUCT.md +132 -0
  9. python_getpaid_simulator-3.0.0/CONTRIBUTING.md +72 -0
  10. python_getpaid_simulator-3.0.0/Dockerfile +29 -0
  11. python_getpaid_simulator-3.0.0/Dockerfile.dockerignore +22 -0
  12. python_getpaid_simulator-3.0.0/Dockerfile.test +42 -0
  13. python_getpaid_simulator-3.0.0/Dockerfile.test.dockerignore +22 -0
  14. python_getpaid_simulator-3.0.0/LICENSE +21 -0
  15. python_getpaid_simulator-3.0.0/Makefile +53 -0
  16. python_getpaid_simulator-3.0.0/PKG-INFO +115 -0
  17. python_getpaid_simulator-3.0.0/README.md +89 -0
  18. python_getpaid_simulator-3.0.0/compose.test.yml +30 -0
  19. python_getpaid_simulator-3.0.0/docker-compose.yml +16 -0
  20. python_getpaid_simulator-3.0.0/docs/changelog.md +28 -0
  21. python_getpaid_simulator-3.0.0/docs/codeofconduct.md +2 -0
  22. python_getpaid_simulator-3.0.0/docs/conf.py +29 -0
  23. python_getpaid_simulator-3.0.0/docs/index.md +13 -0
  24. python_getpaid_simulator-3.0.0/docs/license.md +7 -0
  25. python_getpaid_simulator-3.0.0/docs/requirements.txt +3 -0
  26. python_getpaid_simulator-3.0.0/pyproject.toml +126 -0
  27. python_getpaid_simulator-3.0.0/src/getpaid_simulator/__init__.py +3 -0
  28. python_getpaid_simulator-3.0.0/src/getpaid_simulator/__main__.py +112 -0
  29. python_getpaid_simulator-3.0.0/src/getpaid_simulator/app.py +132 -0
  30. python_getpaid_simulator-3.0.0/src/getpaid_simulator/core/__init__.py +1 -0
  31. python_getpaid_simulator-3.0.0/src/getpaid_simulator/core/config.py +57 -0
  32. python_getpaid_simulator-3.0.0/src/getpaid_simulator/core/discovery.py +12 -0
  33. python_getpaid_simulator-3.0.0/src/getpaid_simulator/core/state.py +58 -0
  34. python_getpaid_simulator-3.0.0/src/getpaid_simulator/core/storage.py +155 -0
  35. python_getpaid_simulator-3.0.0/src/getpaid_simulator/core/webhooks.py +60 -0
  36. python_getpaid_simulator-3.0.0/src/getpaid_simulator/plugins.py +216 -0
  37. python_getpaid_simulator-3.0.0/src/getpaid_simulator/py.typed +0 -0
  38. python_getpaid_simulator-3.0.0/src/getpaid_simulator/spi.py +31 -0
  39. python_getpaid_simulator-3.0.0/src/getpaid_simulator/ui/__init__.py +1 -0
  40. python_getpaid_simulator-3.0.0/src/getpaid_simulator/ui/routes.py +104 -0
  41. python_getpaid_simulator-3.0.0/src/getpaid_simulator/ui/static/.gitkeep +0 -0
  42. python_getpaid_simulator-3.0.0/src/getpaid_simulator/ui/static/style.css +262 -0
  43. python_getpaid_simulator-3.0.0/src/getpaid_simulator/ui/templates/.gitkeep +0 -0
  44. python_getpaid_simulator-3.0.0/src/getpaid_simulator/ui/templates/authorize.html +24 -0
  45. python_getpaid_simulator-3.0.0/src/getpaid_simulator/ui/templates/base.html +31 -0
  46. python_getpaid_simulator-3.0.0/src/getpaid_simulator/ui/templates/components/dashboard_payment_card.html +9 -0
  47. python_getpaid_simulator-3.0.0/src/getpaid_simulator/ui/templates/components/payment_card.html +17 -0
  48. python_getpaid_simulator-3.0.0/src/getpaid_simulator/ui/templates/components/status_badge.html +3 -0
  49. python_getpaid_simulator-3.0.0/src/getpaid_simulator/ui/templates/dashboard.html +45 -0
  50. python_getpaid_simulator-3.0.0/tests/__init__.py +1 -0
  51. python_getpaid_simulator-3.0.0/tests/conftest.py +12 -0
  52. python_getpaid_simulator-3.0.0/tests/e2e/__init__.py +1 -0
  53. python_getpaid_simulator-3.0.0/tests/e2e/conftest.py +215 -0
  54. python_getpaid_simulator-3.0.0/tests/e2e/test_e2e_dashboard.py +48 -0
  55. python_getpaid_simulator-3.0.0/tests/e2e/test_e2e_payu_flow.py +80 -0
  56. python_getpaid_simulator-3.0.0/tests/test_app.py +218 -0
  57. python_getpaid_simulator-3.0.0/tests/test_cli.py +148 -0
  58. python_getpaid_simulator-3.0.0/tests/test_config.py +95 -0
  59. python_getpaid_simulator-3.0.0/tests/test_discovery.py +110 -0
  60. python_getpaid_simulator-3.0.0/tests/test_legacy_provider_modules.py +18 -0
  61. python_getpaid_simulator-3.0.0/tests/test_paynow_payments.py +133 -0
  62. python_getpaid_simulator-3.0.0/tests/test_paynow_refunds.py +248 -0
  63. python_getpaid_simulator-3.0.0/tests/test_paynow_signing.py +243 -0
  64. python_getpaid_simulator-3.0.0/tests/test_paynow_webhooks.py +287 -0
  65. python_getpaid_simulator-3.0.0/tests/test_payu_lifecycle.py +171 -0
  66. python_getpaid_simulator-3.0.0/tests/test_payu_oauth.py +298 -0
  67. python_getpaid_simulator-3.0.0/tests/test_payu_orders.py +78 -0
  68. python_getpaid_simulator-3.0.0/tests/test_payu_refunds.py +184 -0
  69. python_getpaid_simulator-3.0.0/tests/test_payu_webhooks.py +298 -0
  70. python_getpaid_simulator-3.0.0/tests/test_smoke.py +45 -0
  71. python_getpaid_simulator-3.0.0/tests/test_state.py +130 -0
  72. python_getpaid_simulator-3.0.0/tests/test_storage.py +146 -0
  73. python_getpaid_simulator-3.0.0/tests/test_test_infrastructure.py +102 -0
  74. python_getpaid_simulator-3.0.0/tests/test_ui_authorize.py +239 -0
  75. python_getpaid_simulator-3.0.0/tests/test_ui_dashboard.py +113 -0
  76. python_getpaid_simulator-3.0.0/tests/test_webhooks.py +174 -0
@@ -0,0 +1,31 @@
1
+ name-template: 'v$RESOLVED_VERSION'
2
+ tag-template: 'v$RESOLVED_VERSION'
3
+ categories:
4
+ - title: ':boom: Breaking Changes'
5
+ label: 'breaking'
6
+ - title: ':rocket: Features'
7
+ label: 'enhancement'
8
+ - title: ':fire: Removals and Deprecations'
9
+ label: 'removal'
10
+ - title: ':beetle: Fixes'
11
+ label: 'bug'
12
+ - title: ':racehorse: Performance'
13
+ label: 'performance'
14
+ - title: ':rotating_light: Testing'
15
+ label: 'testing'
16
+ - title: ':construction_worker: Continuous Integration'
17
+ label: 'ci'
18
+ - title: ':books: Documentation'
19
+ label: 'documentation'
20
+ - title: ':hammer: Refactoring'
21
+ label: 'refactoring'
22
+ - title: ':lipstick: Style'
23
+ label: 'style'
24
+ - title: ':package: Dependencies'
25
+ labels:
26
+ - 'dependencies'
27
+ - 'build'
28
+ template: |
29
+ ## Changes
30
+
31
+ $CHANGES
@@ -0,0 +1,58 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ unit:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ python-version: ["3.12", "3.13"]
14
+
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - name: Set up Python ${{ matrix.python-version }}
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: ${{ matrix.python-version }}
22
+
23
+ - name: Install uv
24
+ run: pip install uv
25
+
26
+ - name: Install unit dependencies
27
+ run: uv sync --frozen
28
+
29
+ - name: Lint with ruff
30
+ run: uv run ruff check .
31
+
32
+ - name: Audit dependencies
33
+ run: uv run pip-audit --strict
34
+
35
+ - name: Run unit tests
36
+ run: make test-unit
37
+
38
+ integration:
39
+ runs-on: ubuntu-latest
40
+ needs: unit
41
+ timeout-minutes: 30
42
+
43
+ steps:
44
+ - uses: actions/checkout@v4
45
+
46
+ - name: Run Docker-backed integration tests
47
+ run: make test-integration
48
+
49
+ e2e:
50
+ runs-on: ubuntu-latest
51
+ needs: unit
52
+ timeout-minutes: 30
53
+
54
+ steps:
55
+ - uses: actions/checkout@v4
56
+
57
+ - name: Run Docker-backed end-to-end tests
58
+ run: make test-e2e
@@ -0,0 +1,70 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - master
8
+
9
+ jobs:
10
+ release:
11
+ name: Release
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Check out the repository
15
+ uses: actions/checkout@v4
16
+ with:
17
+ fetch-depth: 0 # Full history needed for version detection
18
+
19
+ - name: Set up Python
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: "3.12"
23
+
24
+ - name: Install uv
25
+ run: pip install uv
26
+
27
+ # Version is read from __init__.py (dynamic via hatch)
28
+ - name: Detect version from __init__.py
29
+ id: get-version
30
+ run: |
31
+ init_py=$(grep -A2 '\[tool\.hatch\.version\]' pyproject.toml | grep '^path\s*=' | head -1 | sed -E "s/path\s*=\s*['\"]([^'\"]+)['\"].*/\1/")
32
+ version=$(grep '__version__' "$init_py" | head -1 | sed -E "s/.*= ['\"]([^'\"]+)['\"].*/\1/")
33
+ echo "version=$version" >> "$GITHUB_OUTPUT"
34
+
35
+ - name: Check if tag already exists
36
+ id: check-tag
37
+ run: |
38
+ tag="v${{ steps.get-version.outputs.version }}"
39
+ if git rev-parse "$tag" >/dev/null 2>&1; then
40
+ echo "already_tagged=true" >> "$GITHUB_OUTPUT"
41
+ else
42
+ echo "already_tagged=false" >> "$GITHUB_OUTPUT"
43
+ fi
44
+
45
+ - name: Tag new version
46
+ if: steps.check-tag.outputs.already_tagged == 'false'
47
+ run: |
48
+ tag="v${{ steps.get-version.outputs.version }}"
49
+ git config user.name "github-actions[bot]"
50
+ git config user.email "github-actions[bot]@users.noreply.github.com"
51
+ git tag -a "$tag" -m "Release $tag"
52
+ git push origin "$tag"
53
+
54
+ - name: Build package
55
+ run: uv build
56
+
57
+ - name: Publish package on PyPI
58
+ uses: pypa/gh-action-pypi-publish@release/v1
59
+ with:
60
+ password: ${{ secrets.PYPI_TOKEN }}
61
+
62
+ - name: Publish the release notes
63
+ if: steps.check-tag.outputs.already_tagged == 'false'
64
+ uses: release-drafter/release-drafter@v5.20.0
65
+ with:
66
+ publish: true
67
+ name: v${{ steps.get-version.outputs.version }}
68
+ tag: v${{ steps.get-version.outputs.version }}
69
+ env:
70
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,20 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+
12
+ # Coverage
13
+ .coverage
14
+ htmlcov/
15
+
16
+ # Sphinx build output
17
+ docs/_build/
18
+
19
+ # uv lock file
20
+ uv.lock
@@ -0,0 +1,15 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v5.0.0
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ - id: end-of-file-fixer
7
+ - id: check-yaml
8
+ - id: check-added-large-files
9
+
10
+ - repo: https://github.com/astral-sh/ruff-pre-commit
11
+ rev: v0.11.12
12
+ hooks:
13
+ - id: ruff
14
+ args: [--fix]
15
+ - id: ruff-format
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,12 @@
1
+ version: 2
2
+ build:
3
+ os: ubuntu-24.04
4
+ tools:
5
+ python: "3.12"
6
+ sphinx:
7
+ configuration: docs/conf.py
8
+ formats: all
9
+ python:
10
+ install:
11
+ - requirements: docs/requirements.txt
12
+ - path: .
@@ -0,0 +1,132 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ - Demonstrating empathy and kindness toward other people
21
+ - Being respectful of differing opinions, viewpoints, and experiences
22
+ - Giving and gracefully accepting constructive feedback
23
+ - Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ - Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ - The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ - Trolling, insulting or derogatory comments, and personal or political attacks
33
+ - Public or private harassment
34
+ - Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ - Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ [dominik@kozaczko.info](mailto:dominik@kozaczko.info).
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.1, available at
119
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
+
121
+ Community Impact Guidelines were inspired by
122
+ [Mozilla's code of conduct enforcement ladder][mozilla coc].
123
+
124
+ For answers to common questions about this code of conduct, see the FAQ at
125
+ [https://www.contributor-covenant.org/faq][faq]. Translations are available at
126
+ [https://www.contributor-covenant.org/translations][translations].
127
+
128
+ [homepage]: https://www.contributor-covenant.org
129
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
+ [mozilla coc]: https://github.com/mozilla/diversity
131
+ [faq]: https://www.contributor-covenant.org/faq
132
+ [translations]: https://www.contributor-covenant.org/translations
@@ -0,0 +1,72 @@
1
+ # Contributor Guide
2
+
3
+ Thank you for your interest in improving python-getpaid-simulator.
4
+ This project is open-source under the [MIT license](https://github.com/django-getpaid/python-getpaid-simulator/blob/main/LICENSE) and
5
+ welcomes contributions in the form of bug reports, feature requests, and pull requests.
6
+
7
+ ## Resources
8
+
9
+ - [Source Code](https://github.com/django-getpaid/python-getpaid-simulator)
10
+ - [Issue Tracker](https://github.com/django-getpaid/python-getpaid-simulator/issues)
11
+
12
+ ## How to report a bug
13
+
14
+ Report bugs on the [Issue Tracker](https://github.com/django-getpaid/python-getpaid-simulator/issues).
15
+
16
+ When filing an issue, include:
17
+
18
+ - Operating system and Python version
19
+ - python-getpaid-simulator version
20
+ - Steps to reproduce
21
+ - Expected vs actual behavior
22
+
23
+ ## How to set up your development environment
24
+
25
+ You need Python 3.12+ and [uv](https://docs.astral.sh/uv/).
26
+
27
+ Clone and install:
28
+
29
+ ```bash
30
+ git clone https://github.com/django-getpaid/python-getpaid-simulator.git
31
+ cd python-getpaid-simulator
32
+ uv sync
33
+ ```
34
+
35
+ Run unit tests:
36
+
37
+ ```bash
38
+ make test-unit
39
+ ```
40
+
41
+ Run integration tests (requires Docker):
42
+
43
+ ```bash
44
+ make test-integration
45
+ ```
46
+
47
+ Run E2E tests (requires Docker + Playwright):
48
+
49
+ ```bash
50
+ make test-e2e
51
+ ```
52
+
53
+ Run linting:
54
+
55
+ ```bash
56
+ uv run ruff check src/ tests/
57
+ uv run ruff format --check src/ tests/
58
+ ```
59
+
60
+ ## How to submit changes
61
+
62
+ 1. Fork the repository and create a feature branch
63
+ 2. Write tests for your changes
64
+ 3. Ensure all tests pass
65
+ 4. Ensure linting passes
66
+ 5. Open a pull request
67
+
68
+ Your pull request needs to:
69
+
70
+ - Pass the test suite without errors
71
+ - Include tests for new functionality
72
+ - Update documentation if adding features
@@ -0,0 +1,29 @@
1
+ FROM python:3.12-slim
2
+
3
+ # Install uv
4
+ RUN pip install --no-cache-dir uv
5
+
6
+ # Create non-root user
7
+ RUN useradd -m -u 1000 simulator
8
+
9
+ # Copy all sibling packages (build context is parent directory)
10
+ COPY getpaid-core/ /app/getpaid-core/
11
+ COPY getpaid-payu/ /app/getpaid-payu/
12
+ COPY getpaid-paynow/ /app/getpaid-paynow/
13
+ COPY getpaid-simulator/ /app/getpaid-simulator/
14
+
15
+ # Set working directory
16
+ WORKDIR /app/getpaid-simulator
17
+
18
+ # Install dependencies (no dev tools, include e2e group for PayU/PayNow)
19
+ RUN uv sync --group e2e --no-dev
20
+
21
+ # Switch to non-root user (AFTER all RUN/COPY)
22
+ USER simulator
23
+
24
+ # Expose port
25
+ EXPOSE 9000
26
+
27
+ # Run simulator with virtual environment
28
+ ENV PATH="/app/getpaid-simulator/.venv/bin:$PATH"
29
+ CMD ["python", "-m", "getpaid_simulator"]
@@ -0,0 +1,22 @@
1
+ **
2
+ !getpaid-core/
3
+ !getpaid-core/**
4
+ !getpaid-payu/
5
+ !getpaid-payu/**
6
+ !getpaid-paynow/
7
+ !getpaid-paynow/**
8
+ !getpaid-simulator/
9
+ !getpaid-simulator/**
10
+
11
+ **/.git
12
+ **/__pycache__
13
+ **/.pytest_cache
14
+ **/.ruff_cache
15
+ **/.mypy_cache
16
+ **/.venv
17
+ **/.sisyphus
18
+ **/dist
19
+ **/build
20
+ **/*.pyc
21
+ **/*.pyo
22
+ **/*.egg-info
@@ -0,0 +1,42 @@
1
+ FROM python:3.12-slim
2
+
3
+ WORKDIR /app/getpaid-simulator
4
+
5
+ RUN apt-get update && apt-get install -y --no-install-recommends \
6
+ git \
7
+ libnss3 \
8
+ libnspr4 \
9
+ libdbus-1-3 \
10
+ libatk1.0-0 \
11
+ libatk-bridge2.0-0 \
12
+ libcups2 \
13
+ libdrm2 \
14
+ libxkbcommon0 \
15
+ libatspi2.0-0 \
16
+ libxcomposite1 \
17
+ libxdamage1 \
18
+ libxfixes3 \
19
+ libxrandr2 \
20
+ libgbm1 \
21
+ libpango-1.0-0 \
22
+ libcairo2 \
23
+ libasound2 \
24
+ libwayland-client0 \
25
+ && rm -rf /var/lib/apt/lists/*
26
+
27
+ RUN pip install --no-cache-dir uv
28
+
29
+ # Copy only the simulator repo (CI checks out a single repo, not the workspace)
30
+ COPY . /app/getpaid-simulator
31
+
32
+ # Strip local editable-source overrides so uv resolves from PyPI in CI.
33
+ # The [tool.uv.sources] section points to sibling repos that don't exist
34
+ # in a standalone checkout.
35
+ RUN sed -i '/^\[tool\.uv\.sources\]/,/^$/d' pyproject.toml
36
+
37
+ ENV PLAYWRIGHT_BROWSERS_PATH="/app/getpaid-simulator/.cache/ms-playwright"
38
+
39
+ RUN uv sync --frozen --group e2e
40
+ RUN uv run playwright install chromium
41
+
42
+ ENV PATH="/app/getpaid-simulator/.venv/bin:$PATH"
@@ -0,0 +1,22 @@
1
+ **
2
+ !getpaid-core/
3
+ !getpaid-core/**
4
+ !getpaid-payu/
5
+ !getpaid-payu/**
6
+ !getpaid-paynow/
7
+ !getpaid-paynow/**
8
+ !getpaid-simulator/
9
+ !getpaid-simulator/**
10
+
11
+ **/.git
12
+ **/__pycache__
13
+ **/.pytest_cache
14
+ **/.ruff_cache
15
+ **/.mypy_cache
16
+ **/.venv
17
+ **/.sisyphus
18
+ **/dist
19
+ **/build
20
+ **/*.pyc
21
+ **/*.pyo
22
+ **/*.egg-info
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright © 2022 Dominik Kozaczko
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,53 @@
1
+ .PHONY: test test-unit test-integration test-e2e test-build test-down pip-audit
2
+
3
+ UNIT_TESTS = \
4
+ tests/test_cli.py \
5
+ tests/test_config.py \
6
+ tests/test_discovery.py \
7
+ tests/test_smoke.py \
8
+ tests/test_storage.py \
9
+ tests/test_state.py \
10
+ tests/test_app.py \
11
+ tests/test_legacy_provider_modules.py \
12
+ tests/test_test_infrastructure.py
13
+
14
+ INTEGRATION_TESTS = \
15
+ tests/test_ui_dashboard.py \
16
+ tests/test_ui_authorize.py \
17
+ tests/test_payu_oauth.py \
18
+ tests/test_payu_orders.py \
19
+ tests/test_payu_webhooks.py \
20
+ tests/test_payu_refunds.py \
21
+ tests/test_payu_lifecycle.py \
22
+ tests/test_paynow_signing.py \
23
+ tests/test_paynow_payments.py \
24
+ tests/test_paynow_webhooks.py \
25
+ tests/test_paynow_refunds.py \
26
+ tests/test_webhooks.py
27
+
28
+ E2E_TESTS = \
29
+ tests/e2e/test_e2e_dashboard.py \
30
+ tests/e2e/test_e2e_payu_flow.py
31
+
32
+ test-unit:
33
+ uv run pytest $(UNIT_TESTS) -x
34
+
35
+ test-integration: test-build
36
+ docker compose -f compose.test.yml run --rm tests uv run pytest $(INTEGRATION_TESTS) -x
37
+
38
+ test-e2e: test-build
39
+ docker compose -f compose.test.yml run --rm tests uv run pytest $(E2E_TESTS) -x
40
+
41
+ test:
42
+ $(MAKE) test-unit
43
+ $(MAKE) test-integration
44
+ $(MAKE) test-e2e
45
+
46
+ test-build:
47
+ docker compose -f compose.test.yml build
48
+
49
+ test-down:
50
+ docker compose -f compose.test.yml down -v
51
+
52
+ pip-audit:
53
+ uv run pip-audit --strict