
# Copyright 2016 Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


import logging
import sys


SELENIUM_LOG_LEVEL = logging.INFO
SCHEME = 'https'
PORT = 443
BROWSER = 'Firefox'
BROWSER_VERSION = ''
BROWSER_PLATFORM = 'ANY'
SELENIUM_SERVER = 'selenium-grid.example.com'
SELENIUM_PORT = 4444
BROWSER_WIDTH = 1280
BROWSER_HEIGHT = 1024


def update_value(key_name, value, force=False):
    """
    Update single value of this config module.
    """
    this_module = sys.modules[__name__]
    key_name = key_name.upper()
    # raise AttributeError if we try to define new value (unless force is used)
    if not force:
        getattr(this_module, key_name)
    setattr(this_module, key_name, value)


# Copyright 2016 Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


import logging
import sys


SELENIUM_LOG_LEVEL = logging.INFO
SCHEME = 'https'
PORT = 443
BROWSER = 'Firefox'
BROWSER_VERSION = ''
BROWSER_PLATFORM = 'ANY'
SELENIUM_SERVER = None
SELENIUM_PORT = 4444
BROWSER_WIDTH = 1280
BROWSER_HEIGHT = 1024


def update_value(key_name, value, force=False):
    """
    Update single value of this config module.
    """
    this_module = sys.modules[__name__]
    key_name = key_name.upper()
    # raise AttributeError if we try to define new value (unless force is used)
    if not force:
        getattr(this_module, key_name)
    setattr(this_module, key_name, value)

Change the default value for SELENIUM_SERVER
Change the default value for SELENIUM_SERVER

  with this change it is possible to use webstr on localhost without any action

Change-Id: Ife533552d7a746401df01c03af0b2d1caf0702b5
Signed-off-by: ltrilety <b0b91364d2d251c1396ffbe2df56e3ab774d4d4b@redhat.com>

  
  # Copyright 2016 Red Hat
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  #
  #     http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  
  import logging
  import sys
  
  
  SELENIUM_LOG_LEVEL = logging.INFO
  SCHEME = 'https'
  PORT = 443
  BROWSER = 'Firefox'
  BROWSER_VERSION = ''
  BROWSER_PLATFORM = 'ANY'
- SELENIUM_SERVER = 'selenium-grid.example.com'
+ SELENIUM_SERVER = None
  SELENIUM_PORT = 4444
  BROWSER_WIDTH = 1280
  BROWSER_HEIGHT = 1024
  
  
  def update_value(key_name, value, force=False):
      """
      Update single value of this config module.
      """
      this_module = sys.modules[__name__]
      key_name = key_name.upper()
      # raise AttributeError if we try to define new value (unless force is used)
      if not force:
          getattr(this_module, key_name)
      setattr(this_module, key_name, value)
  
Change the default value for SELENIUM_SERVER
## Code Before:

# Copyright 2016 Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


import logging
import sys


SELENIUM_LOG_LEVEL = logging.INFO
SCHEME = 'https'
PORT = 443
BROWSER = 'Firefox'
BROWSER_VERSION = ''
BROWSER_PLATFORM = 'ANY'
SELENIUM_SERVER = 'selenium-grid.example.com'
SELENIUM_PORT = 4444
BROWSER_WIDTH = 1280
BROWSER_HEIGHT = 1024


def update_value(key_name, value, force=False):
    """
    Update single value of this config module.
    """
    this_module = sys.modules[__name__]
    key_name = key_name.upper()
    # raise AttributeError if we try to define new value (unless force is used)
    if not force:
        getattr(this_module, key_name)
    setattr(this_module, key_name, value)

## Instruction:
Change the default value for SELENIUM_SERVER
## Code After:

# Copyright 2016 Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


import logging
import sys


SELENIUM_LOG_LEVEL = logging.INFO
SCHEME = 'https'
PORT = 443
BROWSER = 'Firefox'
BROWSER_VERSION = ''
BROWSER_PLATFORM = 'ANY'
SELENIUM_SERVER = None
SELENIUM_PORT = 4444
BROWSER_WIDTH = 1280
BROWSER_HEIGHT = 1024


def update_value(key_name, value, force=False):
    """
    Update single value of this config module.
    """
    this_module = sys.modules[__name__]
    key_name = key_name.upper()
    # raise AttributeError if we try to define new value (unless force is used)
    if not force:
        getattr(this_module, key_name)
    setattr(this_module, key_name, value)
