Skip to content

Andryj96/drones

Repository files navigation

Drones Test

Build command

docker-compose build

Run command

docker-compose up -d

Next go to Api doc for the api definitions and explication

  • The program will load some data for testing like drones, medications and one user account
  • Use JWT for authentication
  • Default user credentials are:
    • username: admin_drones

    • password: admin_drones

    • Request:

    curl --request POST 'http://localhost:8000/token/obtain/' \
        --header 'Content-Type: application/json' \
        --data-raw '{
            "username": "admin_drones",
            "password": "admin_drones"
        }'
    • Response: {"access": "xxxxxxx", "refresh": "xxxxxxx"}

    • access is the token for authentication (lifetime: 5 minutes), refresh is the token for refreshing the token

    • Example Request:

    curl --location --request GET 'http://localhost:8000/drones/list' \
        --header 'Authorization: Bearer _access_token_'

Requeriments:

Test command

docker-compose exec backend python manage.py test apps/

About

Drones management systems test

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published