Coder Social home page Coder Social logo

Add a full test suite about pokeapi HOT 3 CLOSED

pokeapi avatar pokeapi commented on July 17, 2024
Add a full test suite

from pokeapi.

Comments (3)

zaneadix avatar zaneadix commented on July 17, 2024

@phalt
What are the parameters we're looking for with these tests? I've spent a few hours digging into django/rest framework testing docs and have got some basics going but haven't been done a ton of unit testing and am not really sure to what level we should be digging for validation.

First thought is to take a look at any api resources we have and write a test that will build out entries in all the tables the resource pulls data from, call the api to get the resource and make sure the fields match what would be expected.

Maybe also add a second object and make sure that "list" calls are returning both objects.

Does that sound about right? You think we need anything else? Is calling the api enough validation that objects are being added to the database the way we expect?

from pokeapi.

phalt avatar phalt commented on July 17, 2024

@zaneadix having good integration tests is a great start. We care about the data given by the API, so we should make sure that is as we expect. Tests that call each resource comparing expected results and actual results is good.

from pokeapi.

zaneadix avatar zaneadix commented on July 17, 2024

Progress made in pull request #62.

from pokeapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.