Use the new lab API (old one lead to nothing), and now Pitt uses an interactive map to show lab statuses. Found the new one by examining network traffic.
New API (and all other ones on the site) don't return numbers for Mac/Windows/Linux available, so I removed those.
_fetch_labs() now return dictionary of labs and if they are open or not
get_status() returns more detailed info about the labs, like how many total machines + how many open
updated lab_test.py:
old mock data is no longer relevant, so updated/trimmed to two tests
assert instance of return
Testing
tested the methods locally and then the tests. all pass locally!
Changes
updated
lab.py
:_fetch_labs()
now return dictionary of labs and if they are open or notget_status()
returns more detailed info about the labs, like how many total machines + how many openupdated
lab_test.py
:Testing