示例#1
0
 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
     ]
示例#2
0
 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
示例#3
0
 def test_construct_one_args(self):
     p = Profile(self.compliance_uri)
     assert p.compliance_uri == self.compliance_uri
     assert p.description == {}
示例#4
0
 def test_construct_no_args(self):
     p = Profile()
     assert p.compliance_uri == ''
     assert p.description == {}