jacob-macleod / Dolphin-Flashcard-App

http://www.dolphinflashcards.com
MIT License
1 stars 3 forks source link

Backend testing #95

Closed jaymeklein closed 3 months ago

jaymeklein commented 3 months ago

Backend Unitary Tests

I made an average of three basic tests for each endpoint:

In total, the test_api.py file has now 31 functional tests (1 is an example of how i made them)

tests

They are in the following structure:

def test_route_explain(self) -> None:
    """
    Brief description
    """
    data = {
        "key1": "value1",
        "key2": "value2"
    }

    # TODO: Warning / Question tho who is coding the backend

    response = True

    self.assertTrue(response, 'Should be True, but was {}'.format(response))

Changes to other files:

I tried to follow the CONTRIBUTING.md in every way, if you find something that i should or should not do, please let me know.

I hope this PR is following everything you asked for.

Pull Requestor Checklist

Issue #87

jacob-macleod commented 3 months ago

Thanks for your work on this