specmatic 0.7.8__tar.gz → 0.7.9__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.

Potentially problematic release.


This version of specmatic might be problematic. Click here for more details.

Files changed (29) hide show
  1. {specmatic-0.7.8/specmatic.egg-info → specmatic-0.7.9}/PKG-INFO +40 -8
  2. {specmatic-0.7.8 → specmatic-0.7.9}/README.md +39 -7
  3. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic/version.py +1 -1
  4. {specmatic-0.7.8 → specmatic-0.7.9/specmatic.egg-info}/PKG-INFO +40 -8
  5. {specmatic-0.7.8 → specmatic-0.7.9}/MANIFEST.in +0 -0
  6. {specmatic-0.7.8 → specmatic-0.7.9}/setup.cfg +0 -0
  7. {specmatic-0.7.8 → specmatic-0.7.9}/setup.py +0 -0
  8. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic/__init__.py +0 -0
  9. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic/core/__init__.py +0 -0
  10. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic/core/decorators.py +0 -0
  11. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic/core/specmatic.jar +0 -0
  12. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic/core/specmatic.py +0 -0
  13. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic/core/specmatic_base.py +0 -0
  14. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic/core/specmatic_stub.py +0 -0
  15. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic/core/specmatic_test.py +0 -0
  16. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic/generators/__init__.py +0 -0
  17. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic/generators/pytest_generator.py +0 -0
  18. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic/generators/test_generator_base.py +0 -0
  19. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic/generators/unittest_generator.py +0 -0
  20. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic/servers/__init__.py +0 -0
  21. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic/servers/app_server.py +0 -0
  22. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic/servers/asgi_server_thread.py +0 -0
  23. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic/servers/wsgi_server.py +0 -0
  24. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic/servers/wsgi_server_thread.py +0 -0
  25. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic/utils.py +0 -0
  26. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic.egg-info/SOURCES.txt +0 -0
  27. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic.egg-info/dependency_links.txt +0 -0
  28. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic.egg-info/requires.txt +0 -0
  29. {specmatic-0.7.8 → specmatic-0.7.9}/specmatic.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: specmatic
3
- Version: 0.7.8
3
+ Version: 0.7.9
4
4
  Summary: A Python module for using the Specmatic Library.
5
5
  Home-page: https://github.com/znsio/specmatic-python-extensions
6
6
  Author: Specmatic Builders
@@ -28,6 +28,8 @@ The open api specification can be present either locally or in a [Central Contra
28
28
  - Declare an empty class in it called 'TestContract'.
29
29
  Specmatic will use this class to inject tests dynamically into it when you run it via say PyTest.
30
30
 
31
+ ## WSGI Apps
32
+
31
33
  #### To run contract tests with a stub for a wsgi app (like Flask):
32
34
  ``````
33
35
  class TestContract:
@@ -55,6 +57,35 @@ Specmatic.test_wsgi_app(app,
55
57
  - You can run this test from either your IDE or command line by pointing pytest to your test folder:
56
58
  ``````pytest test -v -s``````
57
59
  - NOTE: Please ensure that you set the '-v' and '-s' flags while running pytest as otherwise pytest may swallow up the console output.
60
+ - [Click here](https://specmatic.in/documentation/service_virtualization_tutorial.html) to learn more about stubbing/service virtualization.
61
+
62
+ #### To run contract tests using a central contract repository:
63
+
64
+ ``````
65
+ Specmatic.test_wsgi_app(app,
66
+ TestContract,
67
+ project_root=PROJECT_ROOT,
68
+ stub_host=stub_host,
69
+ stub_port=stub_port,
70
+ expectation_files=[expectation_json_file])
71
+ ``````
72
+
73
+ - When using a [central contract repository](https://specmatic.in/documentation/central_contract_repository.html), provide the absolute path to the root folder
74
+ of your application in the 'project_root' parameter.
75
+ - You would need to have a specmatic.json file in your project root directory. [Click here](https://specmatic.in/documentation/central_contract_repository.html#specmaticjson) to learn
76
+ more about the specmatic.json file.
77
+
78
+
79
+ #### To run contract tests without a stub, set the 'with_stub' parameter as False:
80
+
81
+ ``````
82
+ Specmatic.test_wsgi_app(app,
83
+ TestContract,
84
+ with_stub=False,
85
+ project_root=ROOT_DIR)
86
+ ``````
87
+
88
+ ## ASGI Apps
58
89
 
59
90
  #### To run contract tests with a stub for an asgi app (like sanic):
60
91
  ``````
@@ -73,12 +104,7 @@ Specmatic.test_asgi_app('main:app',
73
104
  - the rest of the arguments are similar to that of the ``````Specmatic.test_wsgi_app()`````` method.
74
105
 
75
106
 
76
- - [Click here](https://specmatic.in/documentation/service_virtualization_tutorial.html) to learn more about stubbing/service virtualization.
77
- - [Check out the Specmatic Order BFF Python repo](https://github.com/znsio/specmatic-order-bff-python/) to see more examples of how to use specmatic with a Flask app.
78
- - [Check out the Specmatic Order BFF Python Sanic repo](https://github.com/znsio/specmatic-order-bff-python-sanic/) to see more examples of how to use specmatic with a Sanic app.
79
- - [Check out the Specmatic Order API Python repo](https://github.com/znsio/specmatic-order-api-python/) to see an examples of how to just run tests without using a stub.
80
-
81
- ### Common Issues
107
+ ## Common Issues
82
108
  - **'Error loading ASGI app'** error when running Specmatic.test_asgi_app()
83
109
  This error occurs due to incorrect module being specified in the app module parameter 'module:app' string.
84
110
 
@@ -87,7 +113,13 @@ Specmatic.test_asgi_app('main:app',
87
113
  For example if your 'app' variable is declared in main.py, try passing 'main:app'.
88
114
  - Try running the app using uvicorn directly:
89
115
  `````` uvciron 'main:app' ``````
90
- If you are able to get the app started using uvicorn, it will work with specmatic too.
116
+ If you are able to get the app started using uvicorn, it will work with specmatic too.
117
+
118
+ ## Sample Projects
119
+ - [Check out the Specmatic Order BFF Python repo](https://github.com/znsio/specmatic-order-bff-python/) to see more examples of how to use specmatic with a Flask app.
120
+ - [Check out the Specmatic Order BFF Python Sanic repo](https://github.com/znsio/specmatic-order-bff-python-sanic/) to see more examples of how to use specmatic with a Sanic app.
121
+ - [Check out the Specmatic Order API Python repo](https://github.com/znsio/specmatic-order-api-python/) to see an examples of how to just run tests without using a stub.
122
+
91
123
 
92
124
 
93
125
 
@@ -19,6 +19,8 @@ The open api specification can be present either locally or in a [Central Contra
19
19
  - Declare an empty class in it called 'TestContract'.
20
20
  Specmatic will use this class to inject tests dynamically into it when you run it via say PyTest.
21
21
 
22
+ ## WSGI Apps
23
+
22
24
  #### To run contract tests with a stub for a wsgi app (like Flask):
23
25
  ``````
24
26
  class TestContract:
@@ -46,6 +48,35 @@ Specmatic.test_wsgi_app(app,
46
48
  - You can run this test from either your IDE or command line by pointing pytest to your test folder:
47
49
  ``````pytest test -v -s``````
48
50
  - NOTE: Please ensure that you set the '-v' and '-s' flags while running pytest as otherwise pytest may swallow up the console output.
51
+ - [Click here](https://specmatic.in/documentation/service_virtualization_tutorial.html) to learn more about stubbing/service virtualization.
52
+
53
+ #### To run contract tests using a central contract repository:
54
+
55
+ ``````
56
+ Specmatic.test_wsgi_app(app,
57
+ TestContract,
58
+ project_root=PROJECT_ROOT,
59
+ stub_host=stub_host,
60
+ stub_port=stub_port,
61
+ expectation_files=[expectation_json_file])
62
+ ``````
63
+
64
+ - When using a [central contract repository](https://specmatic.in/documentation/central_contract_repository.html), provide the absolute path to the root folder
65
+ of your application in the 'project_root' parameter.
66
+ - You would need to have a specmatic.json file in your project root directory. [Click here](https://specmatic.in/documentation/central_contract_repository.html#specmaticjson) to learn
67
+ more about the specmatic.json file.
68
+
69
+
70
+ #### To run contract tests without a stub, set the 'with_stub' parameter as False:
71
+
72
+ ``````
73
+ Specmatic.test_wsgi_app(app,
74
+ TestContract,
75
+ with_stub=False,
76
+ project_root=ROOT_DIR)
77
+ ``````
78
+
79
+ ## ASGI Apps
49
80
 
50
81
  #### To run contract tests with a stub for an asgi app (like sanic):
51
82
  ``````
@@ -64,12 +95,7 @@ Specmatic.test_asgi_app('main:app',
64
95
  - the rest of the arguments are similar to that of the ``````Specmatic.test_wsgi_app()`````` method.
65
96
 
66
97
 
67
- - [Click here](https://specmatic.in/documentation/service_virtualization_tutorial.html) to learn more about stubbing/service virtualization.
68
- - [Check out the Specmatic Order BFF Python repo](https://github.com/znsio/specmatic-order-bff-python/) to see more examples of how to use specmatic with a Flask app.
69
- - [Check out the Specmatic Order BFF Python Sanic repo](https://github.com/znsio/specmatic-order-bff-python-sanic/) to see more examples of how to use specmatic with a Sanic app.
70
- - [Check out the Specmatic Order API Python repo](https://github.com/znsio/specmatic-order-api-python/) to see an examples of how to just run tests without using a stub.
71
-
72
- ### Common Issues
98
+ ## Common Issues
73
99
  - **'Error loading ASGI app'** error when running Specmatic.test_asgi_app()
74
100
  This error occurs due to incorrect module being specified in the app module parameter 'module:app' string.
75
101
 
@@ -78,7 +104,13 @@ Specmatic.test_asgi_app('main:app',
78
104
  For example if your 'app' variable is declared in main.py, try passing 'main:app'.
79
105
  - Try running the app using uvicorn directly:
80
106
  `````` uvciron 'main:app' ``````
81
- If you are able to get the app started using uvicorn, it will work with specmatic too.
107
+ If you are able to get the app started using uvicorn, it will work with specmatic too.
108
+
109
+ ## Sample Projects
110
+ - [Check out the Specmatic Order BFF Python repo](https://github.com/znsio/specmatic-order-bff-python/) to see more examples of how to use specmatic with a Flask app.
111
+ - [Check out the Specmatic Order BFF Python Sanic repo](https://github.com/znsio/specmatic-order-bff-python-sanic/) to see more examples of how to use specmatic with a Sanic app.
112
+ - [Check out the Specmatic Order API Python repo](https://github.com/znsio/specmatic-order-api-python/) to see an examples of how to just run tests without using a stub.
113
+
82
114
 
83
115
 
84
116
 
@@ -1,2 +1,2 @@
1
- __version__ = '0.7.8'
1
+ __version__ = '0.7.9'
2
2
  __specmatic_version__ = '0.67.0'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: specmatic
3
- Version: 0.7.8
3
+ Version: 0.7.9
4
4
  Summary: A Python module for using the Specmatic Library.
5
5
  Home-page: https://github.com/znsio/specmatic-python-extensions
6
6
  Author: Specmatic Builders
@@ -28,6 +28,8 @@ The open api specification can be present either locally or in a [Central Contra
28
28
  - Declare an empty class in it called 'TestContract'.
29
29
  Specmatic will use this class to inject tests dynamically into it when you run it via say PyTest.
30
30
 
31
+ ## WSGI Apps
32
+
31
33
  #### To run contract tests with a stub for a wsgi app (like Flask):
32
34
  ``````
33
35
  class TestContract:
@@ -55,6 +57,35 @@ Specmatic.test_wsgi_app(app,
55
57
  - You can run this test from either your IDE or command line by pointing pytest to your test folder:
56
58
  ``````pytest test -v -s``````
57
59
  - NOTE: Please ensure that you set the '-v' and '-s' flags while running pytest as otherwise pytest may swallow up the console output.
60
+ - [Click here](https://specmatic.in/documentation/service_virtualization_tutorial.html) to learn more about stubbing/service virtualization.
61
+
62
+ #### To run contract tests using a central contract repository:
63
+
64
+ ``````
65
+ Specmatic.test_wsgi_app(app,
66
+ TestContract,
67
+ project_root=PROJECT_ROOT,
68
+ stub_host=stub_host,
69
+ stub_port=stub_port,
70
+ expectation_files=[expectation_json_file])
71
+ ``````
72
+
73
+ - When using a [central contract repository](https://specmatic.in/documentation/central_contract_repository.html), provide the absolute path to the root folder
74
+ of your application in the 'project_root' parameter.
75
+ - You would need to have a specmatic.json file in your project root directory. [Click here](https://specmatic.in/documentation/central_contract_repository.html#specmaticjson) to learn
76
+ more about the specmatic.json file.
77
+
78
+
79
+ #### To run contract tests without a stub, set the 'with_stub' parameter as False:
80
+
81
+ ``````
82
+ Specmatic.test_wsgi_app(app,
83
+ TestContract,
84
+ with_stub=False,
85
+ project_root=ROOT_DIR)
86
+ ``````
87
+
88
+ ## ASGI Apps
58
89
 
59
90
  #### To run contract tests with a stub for an asgi app (like sanic):
60
91
  ``````
@@ -73,12 +104,7 @@ Specmatic.test_asgi_app('main:app',
73
104
  - the rest of the arguments are similar to that of the ``````Specmatic.test_wsgi_app()`````` method.
74
105
 
75
106
 
76
- - [Click here](https://specmatic.in/documentation/service_virtualization_tutorial.html) to learn more about stubbing/service virtualization.
77
- - [Check out the Specmatic Order BFF Python repo](https://github.com/znsio/specmatic-order-bff-python/) to see more examples of how to use specmatic with a Flask app.
78
- - [Check out the Specmatic Order BFF Python Sanic repo](https://github.com/znsio/specmatic-order-bff-python-sanic/) to see more examples of how to use specmatic with a Sanic app.
79
- - [Check out the Specmatic Order API Python repo](https://github.com/znsio/specmatic-order-api-python/) to see an examples of how to just run tests without using a stub.
80
-
81
- ### Common Issues
107
+ ## Common Issues
82
108
  - **'Error loading ASGI app'** error when running Specmatic.test_asgi_app()
83
109
  This error occurs due to incorrect module being specified in the app module parameter 'module:app' string.
84
110
 
@@ -87,7 +113,13 @@ Specmatic.test_asgi_app('main:app',
87
113
  For example if your 'app' variable is declared in main.py, try passing 'main:app'.
88
114
  - Try running the app using uvicorn directly:
89
115
  `````` uvciron 'main:app' ``````
90
- If you are able to get the app started using uvicorn, it will work with specmatic too.
116
+ If you are able to get the app started using uvicorn, it will work with specmatic too.
117
+
118
+ ## Sample Projects
119
+ - [Check out the Specmatic Order BFF Python repo](https://github.com/znsio/specmatic-order-bff-python/) to see more examples of how to use specmatic with a Flask app.
120
+ - [Check out the Specmatic Order BFF Python Sanic repo](https://github.com/znsio/specmatic-order-bff-python-sanic/) to see more examples of how to use specmatic with a Sanic app.
121
+ - [Check out the Specmatic Order API Python repo](https://github.com/znsio/specmatic-order-api-python/) to see an examples of how to just run tests without using a stub.
122
+
91
123
 
92
124
 
93
125
 
File without changes
File without changes
File without changes
File without changes