def test_handle_bar_updates_indicator(self): # Arrange indicator = BollingerBands(20, 2.0) bar = TestStubs.bar_5decimal() # Act indicator.handle_bar(bar) # Assert assert indicator.has_inputs assert indicator.middle == 1.0000266666666666
def test_handle_bar_updates_indicator(self): # Arrange indicator = BollingerBands(20, 2.0) bar = TestStubs.bar_5decimal() # Act indicator.handle_bar(bar) # Assert self.assertTrue(indicator.has_inputs) self.assertEqual(1.0000266666666666, indicator.middle)