예제 #1
0
 def test_file_exists(self):
     """
     It should act like os.path join with base-folder
     """
     self.assertEqual(
         guarded_safe_join(TEST_DIR, 'check.txt'),
         os.path.join(ABSPATH, TEST_DIR, 'check.txt')
     )
예제 #2
0
    def test_not_exists(self):
        """
        It should act like os.path join
        If file/folder doesn't exists returns joined-path
        """

        self.assertEqual(
            guarded_safe_join(TEST_DIR, "file-does-not-exists"),
            os.path.join(ABSPATH, TEST_DIR, "file-does-not-exists")
        )