예제 #1
0
파일: path_test.py 프로젝트: thieman/dusty
 def test_parent_dir_on_root_dir(self):
     self.assertEqual(parent_dir('/'), '/')
예제 #2
0
파일: path_test.py 프로젝트: thieman/dusty
 def test_parent_dir_on_dir(self):
     self.assertEqual(parent_dir('/some/long/dir'), '/some/long')
예제 #3
0
파일: path_test.py 프로젝트: thieman/dusty
 def test_parent_dir_on_file(self):
     self.assertEqual(parent_dir('/some/long/dir/file.txt'),
                      '/some/long/dir')
예제 #4
0
 def write_file_in_container(self, service_name, file_path, contents):
     self.exec_in_container(service_name, 'mkdir -p {}'.format(parent_dir(file_path)))
     self.exec_in_container(service_name, 'sh -c "echo -n {} > {}"'.format(contents, file_path))
예제 #5
0
파일: path_test.py 프로젝트: apeace/dusty
 def test_parent_dir_on_root_dir(self):
     self.assertEqual(parent_dir("/"), "/")
예제 #6
0
파일: path_test.py 프로젝트: apeace/dusty
 def test_parent_dir_on_file(self):
     self.assertEqual(parent_dir("/some/long/dir/file.txt"), "/some/long/dir")
예제 #7
0
파일: path_test.py 프로젝트: apeace/dusty
 def test_parent_dir_on_dir(self):
     self.assertEqual(parent_dir("/some/long/dir"), "/some/long")
예제 #8
0
 def write_file_in_container(self, service_name, file_path, contents):
     self.exec_in_container(service_name, 'mkdir -p {}'.format(parent_dir(file_path)))
     self.exec_in_container(service_name, 'sh -c "echo -n {} > {}"'.format(contents, file_path))