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()

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()
--- 
+++ 
@@ -1,3 +1,5 @@
+import os
+
 from twisted.trial import unittest
 
 from ooni.settings import config
@@ -5,6 +7,8 @@
 
 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):
Set the datadirectory to be that of the repo.
