@patch('koi.configure.open', create=True)
def test_define_options(mock_open):
    conf = """
    server = 'localhost'
    port = 8000
    version = '0.1.1'
    log_file_prefix = 'mylog'
    """
    file_handle = mock_open.return_value.__enter__.return_value
    file_handle.read = Mock(return_value=dedent(conf).strip())

    define_options(None)

    assert options.server == 'localhost'
    assert options.port == 8000
    assert options.version == '0.1.1'
    assert options.log_file_prefix == 'mylog'
dataset/ETHPy150Open openpermissions/koi/tests/unit/ssl/test_configure.py/test_define_options/original