{"id":22246592,"url":"https://github.com/el634dev/acs-1220-testing-homework","last_synced_at":"2025-07-11T05:35:59.873Z","repository":{"id":225066711,"uuid":"762423230","full_name":"el634dev/ACS-1220-Testing-Homework","owner":"el634dev","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-06T16:55:56.000Z","size":74,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T10:30:29.389Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/el634dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-23T18:46:47.000Z","updated_at":"2024-02-23T18:47:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb37240f-20c5-4d35-b426-223a173834d2","html_url":"https://github.com/el634dev/ACS-1220-Testing-Homework","commit_stats":null,"previous_names":["el634dev/acs-1220-testing-homework"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/el634dev%2FACS-1220-Testing-Homework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/el634dev%2FACS-1220-Testing-Homework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/el634dev%2FACS-1220-Testing-Homework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/el634dev%2FACS-1220-Testing-Homework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/el634dev","download_url":"https://codeload.github.com/el634dev/ACS-1220-Testing-Homework/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245451249,"owners_count":20617479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T05:28:19.457Z","updated_at":"2025-03-25T11:24:43.617Z","avatar_url":"https://github.com/el634dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Books App Part 4 (Tests)\n\n## Prerequisites\n\nIn order for this project's dependencies to install, you'll need PostgreSQL running on your computer.\n\nInstall it by opening your terminal, and pasting the following command:\n\n```bash\nbrew install postgresql\n```\n\n## Setup\n\nClone this repository to your computer. \n\n**Take a look at the code** - it looks a bit different than what you're used to. Namely, the code is now separated out into several files rather than being written in a single `app.py` file. Since we're now writing model and form code as well as route code, this will help us to maintain some structure and separation.\n\n**To run the code**, navigate to the project folder and run the following to create a virtual environment and install the required packages:\n\n```bash\npython3 -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\n```\n\nThen, copy the `.env.example` file to `.env`:\n\n```bash\ncp .env.example .env\n```\n\nThen you can run the following to run the Flask server:\n\n```bash\npython app.py\n```\n\n## Running the Tests\n\n**To run all of the tests**, you can run the following from the root project directory:\n\n```bash\npython -m unittest discover\n```\n\n(Make sure you have unittest installed.)\n\n**To run all tests from a single file**, run the following:\n\n```bash\npython -m unittest books_app.main.tests\n```\n\n**To run one specific test**, you can run the following:\n\n```bash\npython -m unittest books_app.main.tests.MainTests.test_homepage_logged_in\n```\n\n## Instructions\n\nNavigate to `books_app/main/tests.py` and `books_app/auth/tests.py`, and complete the TODOs to finish all tests. Make sure you run the tests as you go along to ensure that they still pass!\n\n## Resources\n\nIf you'd like more resources on working with Flask-WTForms, check out the following:\n\n- [Unit Testing a Flask Application](https://www.patricksoftwareblog.com/unit-testing-a-flask-application/)\n- [Testing Flask Applications](https://flask.palletsprojects.com/en/1.1.x/testing/)\n- [Python Tutorial: Unit Testing Your Code with the unittest Module [VIDEO]](https://www.youtube.com/watch?v=6tNS--WetLI)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fel634dev%2Facs-1220-testing-homework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fel634dev%2Facs-1220-testing-homework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fel634dev%2Facs-1220-testing-homework/lists"}