Skip to content

Chalange from Let's delivery for developerment backend junior with Django.

Notifications You must be signed in to change notification settings

mateuscardosodeveloper/CatApiDjangoRestFramework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Challenge from Let's delivery

Goal of this projects is I'm lerner more about django rest framework

  • We have three endpoints

  • First endpoint is a list to endpoint for a cats management

  • Second endpoint is to create a new Cat

  • Third endpoint is to update or delete one cat select for id

  • Also have filter to search cats registered

  • I have create one command in python manage.py to create three new cats

    python manage.py create_three_cat

About tests

  • Test is based in models, cat and command

  • Models have one test to create a new cat if have string representation

  • Cat have six tests, to create new cat success, create new cat fail, update partial cat, update full cat, if update cat breeed with value already registered and filter with value negative.

  • Command have one test, if command create three new cats correctly

how execute this project using docker

# into folder the project excute command

docker build .

# the next

docker-compose build

# now excute project

docker-compose up

# to see tests excute

docker-compose run --rm app sh -c 'python manage.py test && flake8' #flake8 is patterns clean code

About

Chalange from Let's delivery for developerment backend junior with Django.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published