Пример #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')
Пример #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'))
Пример #3
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"))