
import sys
import os
import libcrowds_statistics as plugin

# Use the PyBossa test suite
sys.path.append(os.path.abspath("./pybossa/test"))

os.environ['STATISTICS_SETTINGS'] = '../settings_test.py'


def setUpPackage():
    """Setup the plugin."""
    from default import flask_app
    with flask_app.app_context():
        flask_app.config['STATISTICS_RECORD_ALL_IPS'] = False
        plugin_dir = os.path.dirname(plugin.__file__)
        plugin.LibCrowdsStatistics(plugin_dir).setup()


import sys
import os
import libcrowds_statistics as plugin

# Use the PyBossa test suite
sys.path.append(os.path.abspath("./pybossa/test"))

os.environ['STATISTICS_SETTINGS'] = '../settings_test.py'


def setUpPackage():
    """Setup the plugin."""
    from default import flask_app
    with flask_app.app_context():
        plugin_dir = os.path.dirname(plugin.__file__)
        plugin.LibCrowdsStatistics(plugin_dir).setup()

Remove duplicate setting of config variable
Remove duplicate setting of config variable

  
  import sys
  import os
  import libcrowds_statistics as plugin
  
  # Use the PyBossa test suite
  sys.path.append(os.path.abspath("./pybossa/test"))
  
  os.environ['STATISTICS_SETTINGS'] = '../settings_test.py'
  
  
  def setUpPackage():
      """Setup the plugin."""
      from default import flask_app
      with flask_app.app_context():
-         flask_app.config['STATISTICS_RECORD_ALL_IPS'] = False
          plugin_dir = os.path.dirname(plugin.__file__)
          plugin.LibCrowdsStatistics(plugin_dir).setup()
  
Remove duplicate setting of config variable
## Code Before:

import sys
import os
import libcrowds_statistics as plugin

# Use the PyBossa test suite
sys.path.append(os.path.abspath("./pybossa/test"))

os.environ['STATISTICS_SETTINGS'] = '../settings_test.py'


def setUpPackage():
    """Setup the plugin."""
    from default import flask_app
    with flask_app.app_context():
        flask_app.config['STATISTICS_RECORD_ALL_IPS'] = False
        plugin_dir = os.path.dirname(plugin.__file__)
        plugin.LibCrowdsStatistics(plugin_dir).setup()

## Instruction:
Remove duplicate setting of config variable
## Code After:

import sys
import os
import libcrowds_statistics as plugin

# Use the PyBossa test suite
sys.path.append(os.path.abspath("./pybossa/test"))

os.environ['STATISTICS_SETTINGS'] = '../settings_test.py'


def setUpPackage():
    """Setup the plugin."""
    from default import flask_app
    with flask_app.app_context():
        plugin_dir = os.path.dirname(plugin.__file__)
        plugin.LibCrowdsStatistics(plugin_dir).setup()
