Ejemplo n.º 1
0
 def test_mkdir(self):
     transport = MemoryTransport()
     transport.mkdir('dir')
     transport.append_bytes('dir/path', 'content')
     self.assertEqual(transport.get('dir/path').read(), 'content')
Ejemplo n.º 2
0
 def test_has_present(self):
     transport = MemoryTransport()
     transport.append_bytes('foo', 'content')
     self.assertEquals(True, transport.has('foo'))
Ejemplo n.º 3
0
 def test_append_and_get(self):
     transport = MemoryTransport()
     transport.append_bytes('path', 'content')
     self.assertEqual(transport.get('path').read(), 'content')
     transport.append_file('path', StringIO('content'))
     self.assertEqual(transport.get('path').read(), 'contentcontent')
Ejemplo n.º 4
0
 def test_mkdir(self):
     transport = MemoryTransport()
     transport.mkdir('dir')
     transport.append_bytes('dir/path', 'content')
     self.assertEqual(transport.get('dir/path').read(), 'content')
Ejemplo n.º 5
0
 def test_has_present(self):
     transport = MemoryTransport()
     transport.append_bytes('foo', 'content')
     self.assertEquals(True, transport.has('foo'))
Ejemplo n.º 6
0
 def test_append_and_get(self):
     transport = MemoryTransport()
     transport.append_bytes('path', 'content')
     self.assertEqual(transport.get('path').read(), 'content')
     transport.append_file('path', StringIO('content'))
     self.assertEqual(transport.get('path').read(), 'contentcontent')