Beispiel #1
0
    def test_verifyMySQLConnectivity_OK(self):
        when(self.platform).getScriptDataDir().thenReturn(self.sandbox)
        settings = MythSettings(self.platform, self.translator)

        privateConfig = OnDemandConfig()
        settings.put("mysql_host", privateConfig.get("mysql_host"))
        settings.put("mysql_database", privateConfig.get("mysql_database"))
        settings.put("mysql_user", privateConfig.get("mysql_user"))
        settings.put("mysql_password", privateConfig.get("mysql_password"))
        settings.verifyMySQLConnectivity()
Beispiel #2
0
    def test_verifyMySQLConnectivity_OK(self):
        when(self.platform).getScriptDataDir().thenReturn(self.sandbox)
        settings = MythSettings(self.platform, self.translator)

        privateConfig = OnDemandConfig()
        settings.put('mysql_host', privateConfig.get('mysql_host'))
        settings.put('mysql_database', privateConfig.get('mysql_database'))
        settings.put('mysql_user', privateConfig.get('mysql_user'))
        settings.put('mysql_password', privateConfig.get('mysql_password'))
        settings.verifyMySQLConnectivity()
Beispiel #3
0
 def test_verifyMySQLConnectivity_InvalidUsernamePasswordThrowsSettingsException(self):
     when(self.platform).getScriptDataDir().thenReturn(self.sandbox)
     settings = MythSettings(self.platform, self.translator)
     privateConfig = OnDemandConfig()
     settings.put("mysql_host", privateConfig.get("mysql_host"))
     settings.put("mysql_database", privateConfig.get("mysql_database"))
     settings.put("mysql_user", "bogususer")
     settings.put("mysql_password", "boguspassword")
     try:
         settings.verifyMySQLConnectivity()
         self.fail("expected failure on invalid username and password")
     except SettingsException, se:
         log.debug("PASS: %s" % se)
Beispiel #4
0
 def test_verifyMySQLConnectivity_InvalidUsernamePasswordThrowsSettingsException(
         self):
     when(self.platform).getScriptDataDir().thenReturn(self.sandbox)
     settings = MythSettings(self.platform, self.translator)
     privateConfig = OnDemandConfig()
     settings.put('mysql_host', privateConfig.get('mysql_host'))
     settings.put('mysql_database', privateConfig.get('mysql_database'))
     settings.put('mysql_user', 'bogususer')
     settings.put('mysql_password', 'boguspassword')
     try:
         settings.verifyMySQLConnectivity()
         self.fail('expected failure on invalid username and password')
     except SettingsException, se:
         log.debug('PASS: %s' % se)