Exemplo n.º 1
0
 def test_newSegment(self, tmp_path):
     '''Test creating a new segment in a warehouse.'''
     dba = DatabaseAccess(tmp_path / "db.json")
     newSegName = "custom"
     wh = Warehouse(tmp_path)
     wh.newSegment(newSegName, dba)
     segNames = wh.listSegments()
     assert len(segNames) == 1
     assert segNames[0] == newSegName
     seg = wh.loadSegment(segNames[0], dba)
     assert seg is not None
Exemplo n.º 2
0
 def test_newSegment(self, tmp_path):
     '''Test creating a new segment in a warehouse.'''
     dba = DatabaseAccess(tmp_path / "db.json")
     newSegName = "custom"
     wh = Warehouse(tmp_path)
     wh.newSegment(newSegName, dba)
     segNames = wh.listSegments()
     assert len(segNames) == 1
     assert segNames[0] == newSegName
     seg = wh.loadSegment(segNames[0], dba)
     assert seg is not None
Exemplo n.º 3
0
 def test_globalWarehouse(self):
     '''Test the default global warehouse.'''
     assert FASHION_WAREHOUSE_PATH is not None
     fw = Warehouse(FASHION_WAREHOUSE_PATH)
     globalSegNames = fw.listSegments()
     assert "fashion.core" in globalSegNames
Exemplo n.º 4
0
 def test_defaultLocalWarehouse(self, tmp_path):
     '''Test the default local warehouse.'''
     lw = Warehouse(tmp_path)
     localSegNames = lw.listSegments()
     assert len(localSegNames) == 0
Exemplo n.º 5
0
 def test_globalWarehouse(self):
     '''Test the default global warehouse.'''
     assert FASHION_WAREHOUSE_PATH is not None
     fw = Warehouse(FASHION_WAREHOUSE_PATH)
     globalSegNames = fw.listSegments()
     assert "fashion.core" in globalSegNames
Exemplo n.º 6
0
 def test_defaultLocalWarehouse(self, tmp_path):
     '''Test the default local warehouse.'''
     lw = Warehouse(tmp_path)
     localSegNames = lw.listSegments()
     assert len(localSegNames) == 0