Пример #1
0
    def testCase(self):
        s = "Hello, World"
        a = glyph.blob(s)
        b = glyph.parse(glyph.dump(a))

        self.assertEqual(s, b.fh.read())

        s = "Hello, World"
        a = glyph.blob(BytesIO(s))
        b = glyph.parse(glyph.dump(a))

        self.assertEqual(s, b.fh.read())
Пример #2
0
    def testCase(self):
        s = "Hello, World"
        a = glyph.blob(s)
        b = glyph.parse(glyph.dump(a))

        self.assertEqual(s, b.fh.read())

        s = "Hello, World"
        a = glyph.blob(BytesIO(s))
        b = glyph.parse(glyph.dump(a))

        self.assertEqual(s, b.fh.read())
Пример #3
0
 def testCase(self):
     root = glyph.get(self.endpoint.url)
     b = glyph.blob(BytesIO("TEST"), content_type="Test")
     b2 = root.do_blob(b)
     self.assertEqual(b2.fh.read(), "test")
     self.assertEqual(b2.content_type, "Test")
Пример #4
0
 def do_blob(self, b):
     s = b.fh.read()
     c = b.content_type
     return glyph.blob(BytesIO(s.lower()), content_type=c)
Пример #5
0
 def testCase(self):
     root = glyph.get(self.endpoint.url)
     b = glyph.blob(BytesIO("TEST"), content_type="Test")
     b2 = root.do_blob(b)
     self.assertEqual(b2.fh.read(), "test")
     self.assertEqual(b2.content_type, "Test")
Пример #6
0
 def do_blob(self, b):
     s = b.fh.read()
     c = b.content_type
     return glyph.blob(BytesIO(s.lower()), content_type=c)