コード例 #1
0
 def test_emptyArgs(self, D):
     if 'BIGITR_DAEMON_CONFIG' in os.environ:
         del os.environ['BIGITR_DAEMON_CONFIG']
     if 'BIGITR_DAEMON_PIDFILE' in os.environ:
         del os.environ['BIGITR_DAEMON_PIDFILE']
     bigitrdaemon.main(['/foo'])
     D.assert_called_once_with('/foo', '~/.bigitrd', True, '~/.bigitrd-pid')
     D().run.assert_called_once_with()
コード例 #2
0
ファイル: bigitrdaemon_test.py プロジェクト: mikjo/bigitr
 def test_emptyArgs(self, D):
     if 'BIGITR_DAEMON_CONFIG' in os.environ:
         del os.environ['BIGITR_DAEMON_CONFIG']
     if 'BIGITR_DAEMON_PIDFILE' in os.environ:
         del os.environ['BIGITR_DAEMON_PIDFILE']
     bigitrdaemon.main(['/foo'])
     D.assert_called_once_with(
         '/foo', '~/.bigitrd', True, '~/.bigitrd-pid')
     D().run.assert_called_once_with()
コード例 #3
0
ファイル: bigitrdaemon_test.py プロジェクト: mikjo/bigitr
    def test_emptyArgsWithEnvironment(self, D):
        os.environ['BIGITR_DAEMON_CONFIG'] = '/b'
        os.environ['BIGITR_DAEMON_PIDFILE'] = '/b-p'
        try:
            bigitrdaemon.main(['/foo'])
            D.assert_called_once_with('/foo', '/b', True, '/b-p')
            D().run.assert_called_once_with()

        finally:
            os.unsetenv('BIGITR_DAEMON_CONFIG')
            os.unsetenv('BIGITR_DAEMON_PIDFILE')
コード例 #4
0
    def test_emptyArgsWithEnvironment(self, D):
        os.environ['BIGITR_DAEMON_CONFIG'] = '/b'
        os.environ['BIGITR_DAEMON_PIDFILE'] = '/b-p'
        try:
            bigitrdaemon.main(['/foo'])
            D.assert_called_once_with('/foo', '/b', True, '/b-p')
            D().run.assert_called_once_with()

        finally:
            os.unsetenv('BIGITR_DAEMON_CONFIG')
            os.unsetenv('BIGITR_DAEMON_PIDFILE')
コード例 #5
0
ファイル: bigitrdaemon_test.py プロジェクト: mikjo/bigitr
 def test_ArgsLong(self, D):
     bigitrdaemon.main(['/foo', '--config', '/b', '--no-daemon', '--pid-file', '/b-p'])
     self.assertNonDefaultArgs(D)
コード例 #6
0
ファイル: bigitrdaemon_test.py プロジェクト: mikjo/bigitr
 def test_ArgsShort(self, D):
     bigitrdaemon.main(['/foo', '-c', '/b', '-n', '-p', '/b-p'])
     self.assertNonDefaultArgs(D)
コード例 #7
0
 def test_ArgsLong(self, D):
     bigitrdaemon.main(
         ['/foo', '--config', '/b', '--no-daemon', '--pid-file', '/b-p'])
     self.assertNonDefaultArgs(D)
コード例 #8
0
 def test_ArgsShort(self, D):
     bigitrdaemon.main(['/foo', '-c', '/b', '-n', '-p', '/b-p'])
     self.assertNonDefaultArgs(D)