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