Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devctx/unit_tests_practice
This repository explores some possibilities of automated tests (unittest and pytest) to verify the import and conversion of simple JSON quizzes. It was also my first steps in using Markdown documentation
https://github.com/devctx/unit_tests_practice
http-server jsonschema jsonschema-validator pytest unittest
Last synced: about 1 month ago
JSON representation
This repository explores some possibilities of automated tests (unittest and pytest) to verify the import and conversion of simple JSON quizzes. It was also my first steps in using Markdown documentation
- Host: GitHub
- URL: https://github.com/devctx/unit_tests_practice
- Owner: DevCTx
- Created: 2022-11-10T23:17:22.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-05-16T18:10:41.000Z (over 1 year ago)
- Last Synced: 2024-11-28T12:53:20.246Z (about 1 month ago)
- Topics: http-server, jsonschema, jsonschema-validator, pytest, unittest
- Language: Python
- Homepage:
- Size: 440 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[README.md](./README.md)
# Unit Tests Practice
#### This repository explores some possibilities of automated tests (unittest and pytest) to verify the import and conversion of simple JSON quizzes. It was also my first steps in using Markdown documentation.
---
## questionnaire_import.py
>python ./questionnaire_import.pyLoads some quizzes from a sample list in the program and converts them into a specific [json format](./questionnaire.md#expected-json-schema) before to save them
into the [json_questionnaires](./json_questionnaires) folderMore info : [questionnaire_import.md](./questionnaire_import.md)
---
## questionnaire.py
>python ./questionnaire.pyDisplays the quiz in argument and counts the number of good answers
More info : [questionnaire.md](./questionnaire.md)
---
## questionnaire_unit_tests.py
>python ./questionnaire_unit_tests.pyUses the `unittest` automated framework but not only to test questionnaire.py
More info : [questionnaire_unit_test.md](./questionnaire_unit_test.md)
Uses the files:
- json_00_empty.json
- json_00_without_extension
- json_01_good_format.json
- json_01_another_good_format.json
- pytest.iniand files into [json_test_files](./json_test_files) folder
---
## [Requirements](./requirements.txt)
- jsonschema==4.17.0
- parameterized==0.8.1
- requests==2.28.1
- validators==0.20.0