Beispiel #1
0
 def list_courses(self):
     self.browser.open(self.base_url)
     response = self.browser.response.text
     courses = helpers.get_courses_from_json(response)
     return courses
Beispiel #2
0
def test_courses_from_json():
    course_json = '{"my_courses": [{"course_path": "/courses/creative-applications-of-deep-learning-with-tensorflow-i"}]}'
    courses = helpers.get_courses_from_json(course_json)
    assert courses == [
        "/courses/creative-applications-of-deep-learning-with-tensorflow-i"
    ]
Beispiel #3
0
def test_courses_from_json():
    course_json = '{"courses": [{"course_path": "/courses/creative-applications-of-deep-learning-with-tensorflow-i"}]}'
    courses = helpers.get_courses_from_json(course_json)
    assert courses == ["/courses/creative-applications-of-deep-learning-with-tensorflow-i"]