예제 #1
0
 def test_from_uri(self):
     e = DataUrlElement.from_uri(self.EXAMPLE_URL)
     self.assertEqual(e.get_bytes(), open(self.EXAMPLE_PTH, 'rb').read())
     self.assertEqual(e.content_type(), 'image/png')
예제 #2
0
 def test_from_uri(self):
     e = DataUrlElement.from_uri(self.EXAMPLE_URL)
     self.assertEqual(e.get_bytes(), open(self.EXAMPLE_PTH, 'rb').read())
     self.assertEqual(e.content_type(), 'image/png')
예제 #3
0
 def test_from_uri(self):
     e = DataUrlElement.from_uri(self.EXAMPLE_URL)
     ntools.assert_equal(e.get_bytes(), open(self.EXAMPLE_PTH).read())
     ntools.assert_equal(e.content_type(), 'image/png')