This project has been archived.
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.
git init
git remote add origin <code-url>
git pull origin main
docker-compose build
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
.
requirements.txt
.
'library name'>='used version',<'version rounded to first decimal '
djangorestframework>=3.12.4,<3.13.0
fastapi
which will contain all user models..\tests\
.[tests]
for testing changes[docker]
for docker changes[models]
for models and serializers related PRs[views]
for functions and permissions related PRs[urls]
for urls and routing related PRs[tickets]
for commits dealing with ticket class[user]
for commits dealing with user class[service]
for commits dealing with service class[role]
for commits dealing with role classAll 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:
FastAPI testclient
library, which in itself uses libraries like starlette, asyncio and pytest-mongodb for setting up a asynchronous endpoint testing environment.