forked from loafle/openapi-generator-original
[POSTMAN] Add Samples GitHub workflow (#17412)
* Add Python tests * Add workflow to verify Postman samples * Correct path
This commit is contained in:
25
samples/schema/postman-collection/python/test/test_info.py
Normal file
25
samples/schema/postman-collection/python/test/test_info.py
Normal file
@@ -0,0 +1,25 @@
|
||||
"""
|
||||
Testing Postman generator output
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
import unittest
|
||||
|
||||
import json
|
||||
|
||||
|
||||
class TestInfo(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
with open('./postman.json', 'r') as file:
|
||||
self.json_data = json.load(file)
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def test_collection_name(self):
|
||||
self.assertEqual(self.json_data['info']['name'], 'Sample project')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user