Exemple #1
0
 def test_log_path_logfile(self):
     path = '/some/path'
     binary = 'foo-bar'
     expected = '%s/%s.log' % (path, binary)
     self.config(log_file=expected)
     self.assertEqual(log._get_log_file_path(self.config_fixture.conf,
                      binary=binary),
                      expected)
Exemple #2
0
 def test_log_path_logfile_overrides_logdir(self):
     path = '/some/path'
     prefix = 'foo-bar'
     expected = '%s/%s.log' % (path, prefix)
     self.config(log_dir='/some/other/path', log_file=expected)
     self.assertEqual(
         log._get_log_file_path(self.config_fixture.conf, binary=prefix),
         expected)
Exemple #3
0
 def test_log_path_logfile(self):
     path = '/some/path'
     binary = 'foo-bar'
     expected = '%s/%s.log' % (path, binary)
     self.config(log_file=expected)
     self.assertEqual(
         log._get_log_file_path(self.config_fixture.conf, binary=binary),
         expected)
Exemple #4
0
 def test_log_path_logfile_overrides_logdir(self):
     path = '/some/path'
     prefix = 'foo-bar'
     expected = '%s/%s.log' % (path, prefix)
     self.config(log_dir='/some/other/path',
                 log_file=expected)
     self.assertEqual(log._get_log_file_path(self.config_fixture.conf,
                      binary=prefix),
                      expected)
Exemple #5
0
 def test_log_path_logfile_overrides_logdir(self):
     self.config(log_dir='/some/other/path',
                 log_file='/some/path/foo-bar.log')
     self.assertEqual(log._get_log_file_path(self.config_fixture.conf,
                      binary='foo-bar'),
                      '/some/path/foo-bar.log')
Exemple #6
0
 def test_log_path_none(self):
     self.config(log_dir=None, log_file=None)
     self.assertIsNone(log._get_log_file_path(self.config_fixture.conf,
                       binary='foo-bar'))
Exemple #7
0
 def test_log_path_logfile(self):
     self.config(log_file='/some/path/foo-bar.log')
     self.assertEqual(log._get_log_file_path(self.config_fixture.conf,
                      binary='foo-bar'),
                      '/some/path/foo-bar.log')
 def test_log_path_logfile_overrides_logdir(self):
     self.config(log_dir='/some/other/path',
                 log_file='/some/path/foo-bar.log')
     self.assertEqual(
         log._get_log_file_path(self.config_fixture.conf, binary='foo-bar'),
         '/some/path/foo-bar.log')
 def test_log_path_none(self):
     self.config(log_dir=None, log_file=None)
     self.assertIsNone(
         log._get_log_file_path(self.config_fixture.conf, binary='foo-bar'))
Exemple #10
0
 def test_log_path_logfile(self):
     self.config(log_file='/some/path/foo-bar.log')
     self.assertEqual(
         log._get_log_file_path(self.config_fixture.conf, binary='foo-bar'),
         '/some/path/foo-bar.log')