def test_bar_aggregation_parser_given_invalid_value_raises_value_error(self):
        # Arrange, Act, Assert
        with pytest.raises(ValueError):
            BarAggregationParser.to_str_py(0)

        with pytest.raises(ValueError):
            BarAggregationParser.from_str_py("")
Example #2
0
    def test_bar_aggregation_from_str(self, string, expected):
        # Arrange
        # Act
        result = BarAggregationParser.from_str_py(string)

        # Assert
        assert expected == result
Example #3
0
    def test_bar_aggregation_to_str(self, enum, expected):
        # Arrange
        # Act
        result = BarAggregationParser.to_str_py(enum)

        # Assert
        assert expected == result