Exemple #1
0
 def test_decode(self):
     from acme.jose.jws import MediaType
     self.assertEqual('application/app',
                      MediaType.decode('application/app'))
     self.assertEqual('application/app', MediaType.decode('app'))
     self.assertRaises(errors.DeserializationError, MediaType.decode,
                       'app;foo')
Exemple #2
0
 def test_encode(self):
     from acme.jose.jws import MediaType
     self.assertEqual('app', MediaType.encode('application/app'))
     self.assertEqual('application/app;foo',
                      MediaType.encode('application/app;foo'))
 def test_decode(self):
     from acme.jose.jws import MediaType
     self.assertEqual('application/app', MediaType.decode('application/app'))
     self.assertEqual('application/app', MediaType.decode('app'))
     self.assertRaises(
         errors.DeserializationError, MediaType.decode, 'app;foo')
 def test_encode(self):
     from acme.jose.jws import MediaType
     self.assertEqual('app', MediaType.encode('application/app'))
     self.assertEqual('application/app;foo',
                      MediaType.encode('application/app;foo'))
Exemple #5
0
    def test_encode(self):
        from acme.jose.jws import MediaType

        self.assertEqual("app", MediaType.encode("application/app"))
        self.assertEqual("application/app;foo", MediaType.encode("application/app;foo"))