def test_invalid_json(self): pkg = Package({'odi-certificate': 'INVALID'}) assert_equal(False, has_certificate(pkg))
def test_valid_json(self): pkg = Package({'odi-certificate': json.dumps(cert)}) assert_equal(True, has_certificate(pkg))
def test_no_certificate(self): pkg = Package({}) assert_equal(False, has_certificate(pkg))
def test_invalid_json(self): pkg = Package({'odi-certificate': 'INVALID'}) assert_equal(False, has_certificate(pkg))
def test_valid_json(self): pkg = Package({'odi-certificate': json.dumps(cert)}) assert_equal(True, has_certificate(pkg))
def test_no_certificate(self): pkg = Package({}) assert_equal(False, has_certificate(pkg))