def test_readAndSum(self):

        sold=SalesProductList()
        sold.addProductsCSV("./csvs/stock-sales_TEST.csv")
        
        eA = Product()
        eA.setAddStyle(SalesAddBehavior())
        eA=eA.addStyle.addItem(eA, -4, 5, 10) #calculated manually

        assert sold['602'].totalCost == eA.totalCost
        assert sold['602'].count == eA.count
        assert sold['602'].retail == eA.retail
    def test_totalSalesBySKU(self):

        sold = SalesProductList()
        sold.addProductsCSV("./csvs/stock-sales_TEST.csv")

        eA = Product()
        eA.setAddStyle(behavior_accumulate_retail())
        eA = eA.addStyle.addItem(eA, -6, 5, 10)  # calculated manually

        assert sold['602'].totalCost == eA.totalCost
        assert sold['602'].count == eA.count
        assert sold['602'].retail == eA.retail

        assert sold['602'].totalCost == -30
        assert sold['602'].count == -6
        assert sold['602'].retail == -60