예제 #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)