Exemplo n.º 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
     ]
Exemplo n.º 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
Exemplo n.º 3
0
 def test_construct_one_args(self):
     p = Profile(self.compliance_uri)
     assert p.compliance_uri == self.compliance_uri
     assert p.description == {}
Exemplo n.º 4
0
 def test_construct_no_args(self):
     p = Profile()
     assert p.compliance_uri == ''
     assert p.description == {}