Skip to content

Getting started with fastAPI REST endpoint point development using common coding scenarios.

Notifications You must be signed in to change notification settings

aang13/fastAPI_skeleton_with_test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An example application to implement unit and integration tests using test database

Introduction

A simple application for fetching and inserting musicians using Rest API to demonstrate the examples of unit test and integration test.

Requirements

  • Application is developed in Python 3.9
  • You can install the packages using the requirements.txt file.
pip install -r requirements.txt

How to Use

The purpose of the application is to show how to develop tests. So, to run the application locally, you need to setup a database instance and implement an endpoint for the external musician client.

To run all tests

pytest test

To run only unit tests

pytest test/ -k 'test and not integration'

To run only integration tests

pytest test/ -k 'integration'

Technologies used

  • FastAPI and uvicorn for Rest API
  • unittest for assertions and mocks
  • testcontainers to initialize local-database for integration tests
  • Flask for MockServer
  • pandas for all dataframe operations
  • psycopg2 to create a connection

About

Getting started with fastAPI REST endpoint point development using common coding scenarios.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages