예제 #1
0
 def add(self, obj):
     Repository.add(self, obj)
     writeIntoBin(self._fileName, self.getAll())
예제 #2
0
def testRepo():
    r = Repository("testprod.txt")
    p = Product("1", "sugar", "100", "3")
    r.add(p)
    assert len(r) == 1
예제 #3
0
 def add(self, obj):
     Repository.add(self, obj)
     writeStInFile(self._fileName, self.getAll())