

@patch('koi.configure.open', create=True)
def test_define_options(mock_open):
    conf = "\n    server = 'localhost'\n    port = 8000\n    version = '0.1.1'\n    log_file_prefix = 'mylog'\n    "
    file_handle = mock_open.return_value.__enter__.return_value
    mock_open.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/VarMisuse@34/99 `file_handle`->`mock_open`