Ejemplo n.º 1
0
 def testParseCommandLine_expect_no_user_password(self):
     sys.argv = ['migration.py']
     migration.parsecommandline()
     self.assertIsNone(configuration.user)
     self.assertIsNone(configuration.password)
Ejemplo n.º 2
0
 def testParseCommandLine_expect_default_configfile(self):
     sys.argv = ['migration.py']
     migration.parsecommandline()
     self.assertEqual('config.ini', configuration.configfile)
Ejemplo n.º 3
0
 def testParseCommandLine_expect_specified_user_password_longoptions(self):
     sys.argv = ['migration.py', '--user', 'anyUser', '--password', 'anyPassword' ]
     migration.parsecommandline()
     self.assertEqual('anyUser', configuration.user)
     self.assertEqual('anyPassword', configuration.password)
Ejemplo n.º 4
0
 def testParseCommandLine_expect_specified_configfile_longoption(self):
     configfilename = 'myLongTestConfig.ini'
     sys.argv = ['migration.py', '--configfile', configfilename]
     migration.parsecommandline()
     self.assertEqual(configfilename, configuration.configfile)