def test_json_encoding_with_description(self): p = Profile(self.compliance_uri, self.description) json_string = json.dumps({'profile': p}, cls=img_info.EnhancedJSONEncoder) assert json.loads(json_string)['profile'] == [ self.compliance_uri, self.description ]
def test_construct_two_args(self): p = Profile(self.compliance_uri, self.description) assert p.compliance_uri == self.compliance_uri assert p.description == self.description
def test_construct_one_args(self): p = Profile(self.compliance_uri) assert p.compliance_uri == self.compliance_uri assert p.description == {}
def test_construct_no_args(self): p = Profile() assert p.compliance_uri == '' assert p.description == {}