コード例 #1
0
    def test_venue_status_parser_given_invalid_value_raises_value_error(self):
        # Arrange
        # Act
        # Assert
        with pytest.raises(ValueError):
            InstrumentStatusParser.to_str_py(0)

        with pytest.raises(ValueError):
            InstrumentStatusParser.from_str_py("")
コード例 #2
0
    def test_venue_status_from_str(self, string, expected):
        # Arrange
        # Act
        result = InstrumentStatusParser.from_str_py(string)

        # Assert
        assert expected == result
コード例 #3
0
    def test_venue_status_to_str(self, enum, expected):
        # Arrange
        # Act
        result = InstrumentStatusParser.to_str_py(enum)

        # Assert
        assert expected == result