def test_make_contract_ok(self): Schedule70Loader.make_contract(self.make_row())
def test_sets_hourly1_and_current_price(self): price = 999.99 c = Schedule70Loader.make_contract(self.make_row(price=str(price))) self.assertEquals(c.hourly_rate_year1, price) self.assertEquals(c.current_price, price)
def test_no_display_price_if_too_low(self): price = FEDERAL_MIN_CONTRACT_RATE - 1.0 c = Schedule70Loader.make_contract(self.make_row(price=str(price))) self.assertEquals(c.hourly_rate_year1, price) self.assertIsNone(c.current_price)
def test_cleans_labor_category(self): row_messy_category = self.make_row(labor_category=' Messy\nCategory') contract = Schedule70Loader.make_contract(row_messy_category) self.assertEquals(contract.labor_category, 'Messy Category')