ComputerSocietyVITC / Sahaay

MIT License
4 stars 7 forks source link
fastapi hacktoberfest hacktoberfest-accepted hacktoberfest2021 python

Notice

This project has been archived.

Sahaay

Sahaay is a Q&A application with grievances/questions being posted as tokens. An open source application developed by the students at IEEE ComSoc VIT Chennai student chapter.

Development

Docker Setup

To setup the live test server, run docker-compose up -d after building the docker image. The live image will then be hosted at https://localhost:8000. The api could be tested using the FastAPI testing interface provided at https://localhost:8000/docs.

Contributing

Writing Tests

All tests should be written before starting to create endpoint routes, to setup constraints to be satisfied by the function/endpoint beforehand.

All tests are stored in the app/tests folder with every separate test file (for every new testing family like user, tickets, etc.) named starting with test_. Similar naming convention is also followed for every test function, following standard pytest naming convention.

While writing tests for unsafe requests(POST, PATCH) use fixtures which are to be defined in the app/tests/fixtures folder.

The tests themselves are of two types: