Example #1
0
 def setup_db(self):
     self.db_file = T.make_test_db()
     T.MockedSettings['db_uri'] = T.get_temp_db_uri(self.db_file)
     T.MockedSettings['irc'] = {
         "nickname": "pushhamster+test",
         "channel": "pushmanagertest"
     }
     with mock.patch.dict(db.Settings, T.MockedSettings):
         db.init_db()
Example #2
0
 def setup_db(self):
     self.db_file = T.make_test_db()
     T.MockedSettings['db_uri'] = T.get_temp_db_uri(self.db_file)
     T.MockedSettings['irc'] = {
         "nickname": "pushhamster+test",
         "channel": "pushmanagertest"
     }
     with mock.patch.dict(db.Settings, T.MockedSettings):
         db.init_db()
Example #3
0
    def setup_db(self):
        self.setup_async_test_case()

        self.db_file = T.make_test_db()
        T.MockedSettings["db_uri"] = T.get_temp_db_uri(self.db_file)
        T.MockedSettings["irc"] = {"nickname": "pushhamster+test", "channel": "pushmanagertest"}
        # for the purpose of unittests we'll use a single application
        # for API and main site.
        T.MockedSettings["api_app"] = {"domain": "localhost", "port": self.get_http_port()}

        with mock.patch.dict(db.Settings, T.MockedSettings):
            db.init_db()
Example #4
0
    def setup_db(self):
        self.setup_async_test_case()

        self.db_file = T.make_test_db()
        T.MockedSettings['db_uri'] = T.get_temp_db_uri(self.db_file)
        T.MockedSettings['irc'] = {
            "nickname": "pushhamster+test",
            "channel": "pushmanagertest"
        }
        # for the purpose of unittests we'll use a single application
        # for API and main site.
        T.MockedSettings['api_app'] = {
            "domain": "localhost",
            "port": self.get_http_port()
        }

        with mock.patch.dict(db.Settings, T.MockedSettings):
            db.init_db()