jyn514 / GradeForge

Courses available from my.sc.edu
GNU General Public License v3.0
1 stars 0 forks source link

automated testing for links in utils #45

Open jyn514 opened 6 years ago

jyn514 commented 6 years ago

There's a severe lack of testing for the code base. The links should be easy to test - if they give 200, they're right, otherwise they give a 404. utils.*_link should all have unit tests in test_utils.py.

charlesdaniels commented 6 years ago

Where are the links stored? I don't see a utils folder in the dev or master branch.

I assume the point would be to test some list of links to see if the HTTP status code is 404 or something else and fail the test for any that are 404 or another error status?

jyn514 commented 6 years ago

These are functions which calculate links based on various course attributes, for example utils.section_link. The links themselves are not stored, see https://github.com/jyn514/GradeForge/issues/26

Correct, we'd just test for a 404 status and succeed otherwise

For example attributes see the database or the test rule in the makefile. For example links, run some searches on the USC site