def test_mkdir(self): transport = MemoryTransport() transport.mkdir('dir') transport.append_bytes('dir/path', 'content') self.assertEqual(transport.get('dir/path').read(), 'content')
def test_put_and_get(self): transport = MemoryTransport() transport.put_file('path', StringIO('content')) self.assertEqual(transport.get('path').read(), 'content') transport.put_bytes('path', 'content') self.assertEqual(transport.get('path').read(), 'content')