def test_d_check_status_license_link(self): """- Check if the 'license' link is a valid https url""" status = Status(self.license) status.update_status() link = status.get_link('license', 'href') self.assertIsNotNone(link) self.assertTrue(link.startswith('https://'))
def setUpClass(cls): # get config cls.config = TestConfig('l1') license = License(cls.config.license()) # Get status from config license status = Status(license) status.update_status() cls.license = status.update_license()
def setUpClass(cls): # get config cls.config = TestConfig('b1') license = License(cls.config.license()) status = Status(license) status.update_status() # Get license from status cls.license = status.update_license()
def setUpClass(cls): cls.config = TestConfig('b1') license = License(cls.config.license()) cls.status = Status(license) cls.status.update_status() cls.original_time = cls.status.get_updated_status() cls.original_events = cls.status.get_events()
def setUpClass(cls): # get config cls.config = TestConfig('l1') license = License(cls.config.license()) # Get status from config license cls.status = Status(license) cls.status.update_status() cls.end = license.get_end()
def setUpClass(cls): # get config cls.config = TestConfig('b1') license = License(cls.config.license()) # Get status from config license cls.status = Status(license) cls.status.update_status() cls.original_time = cls.status.get_updated_status()
def test_b_check_status_document(self): """- Check that the JSON document is valid, using the corresponding JSON schema""" status = Status(self.license) status.update_status() self.assertIsNotNone(status) try: status.check_schema() except: self.fail("Status schema validation failure {}".format(status.status))
def test_e_check_license_mimetype(self): """- Check that the corresponding mime-type is 'application/vnd.readium.lcp.license.v1.0+json'""" status = Status(self.license) status.update_status() mimetype = status.get_link('license', 'type') self.assertEquals(mimetype, License.LICENSE_MIMETYPE)
def test_c_status_events(self): """- Check if events are (or not) available""" status = Status(self.license) status.update_status() events = status.get_events() self.assertIsNotNone(events, "This is not an ERROR : no events are available in the status document")
def setUpClass(cls): cls.config = TestConfig('b3') cls.license = License(cls.config.license()) cls.status = Status(cls.license) cls.status.update_status()