from twisted.trial import unittest

from ooni.settings import config


class ConfigTestCase(unittest.TestCase):
    def setUp(self):
        config.initialize_ooni_home("ooni_home")

    def tearDown(self):
        config.read_config_file()
import os

from twisted.trial import unittest

from ooni.settings import config


class ConfigTestCase(unittest.TestCase):
    def setUp(self):
        config.global_options['datadir'] = os.path.join(__file__, '..', '..', '..', 'data')
        config.global_options['datadir'] = os.path.abspath(config.global_options['datadir'])
        config.initialize_ooni_home("ooni_home")

    def tearDown(self):
        config.read_config_file()

Set the datadirectory to be that of the repo.
Set the datadirectory to be that of the repo.

+ import os
+ 
  from twisted.trial import unittest
  
  from ooni.settings import config
  
  
  class ConfigTestCase(unittest.TestCase):
      def setUp(self):
+         config.global_options['datadir'] = os.path.join(__file__, '..', '..', '..', 'data')
+         config.global_options['datadir'] = os.path.abspath(config.global_options['datadir'])
          config.initialize_ooni_home("ooni_home")
  
      def tearDown(self):
          config.read_config_file()
+ 
Set the datadirectory to be that of the repo.
## Code Before:
from twisted.trial import unittest

from ooni.settings import config


class ConfigTestCase(unittest.TestCase):
    def setUp(self):
        config.initialize_ooni_home("ooni_home")

    def tearDown(self):
        config.read_config_file()
## Instruction:
Set the datadirectory to be that of the repo.
## Code After:
import os

from twisted.trial import unittest

from ooni.settings import config


class ConfigTestCase(unittest.TestCase):
    def setUp(self):
        config.global_options['datadir'] = os.path.join(__file__, '..', '..', '..', 'data')
        config.global_options['datadir'] = os.path.abspath(config.global_options['datadir'])
        config.initialize_ooni_home("ooni_home")

    def tearDown(self):
        config.read_config_file()
