class TestStorageSystem(TestCase):

    def setUp(self):
        self.storage = StorageSystem("unitTest.exe")
        try:
            self.storage.add_file(open("write.txt",'rb'))
        except FileAllreadyExistsException:
            pass

        if self.storage.buffer.getCount() == 0:
            raise Exception('There was a problem')

    def test_getStats(self):
        self.storage.stat()
Exemplo n.º 2
0
from storagesystem import StorageSystem


m = StorageSystem()

print type(m.file)

file = 'write.txt'

m.add_file(open(file,'rb'))

m.get_file("write.txt")