Ejemplo n.º 1
0
 def test_make_targz_with_name(self, mock_exec, mock_makedirs):
     self.assertEqual(bu.make_targz('/test/path', 'testname'), 'testname')
     mock_exec.assert_called_with('tar',
                                  '-czf',
                                  'testname',
                                  '--directory',
                                  '/test/path',
                                  '.',
                                  logged=True)
Ejemplo n.º 2
0
 def test_make_targz(self, mock_uuid, mock_exec, mock_makedirs):
     self.assertEqual(bu.make_targz('/test/path'), 'fake_uuid.tar.gz')
     mock_exec.assert_called_with('tar',
                                  '-czf',
                                  'fake_uuid.tar.gz',
                                  '--directory',
                                  '/test/path',
                                  '.',
                                  logged=True)
Ejemplo n.º 3
0
 def test_make_targz_with_name(self, mock_exec, mock_makedirs):
     self.assertEqual(bu.make_targz('/test/path', 'testname'), 'testname')
     mock_exec.assert_called_with('tar', '-czf', 'testname', '--directory',
                                  '/test/path', '.', logged=True)
Ejemplo n.º 4
0
 def test_make_targz(self, mock_uuid, mock_exec, mock_makedirs):
     self.assertEqual(bu.make_targz('/test/path'), 'fake_uuid.tar.gz')
     mock_exec.assert_called_with('tar', '-czf', 'fake_uuid.tar.gz',
                                  '--directory', '/test/path', '.',
                                  logged=True)