mirror of
https://github.com/budtmo/docker-android.git
synced 2026-07-28 14:49:08 +00:00
add unit test to symlink_force
This commit is contained in:
@@ -9,6 +9,19 @@ from src import app
|
||||
|
||||
class TestApp(TestCase):
|
||||
"""Unit test class to test other methods in the app."""
|
||||
def test_symlink_correct(self):
|
||||
os.mknod(os.path.join("./","testFile1.txt"))
|
||||
app.symlink_force(os.path.join("./","testFile1.txt"),os.path.join("./","link_testFile1.txt"))
|
||||
os.remove(os.path.join("./","testFile1.txt"))
|
||||
os.remove(os.path.join("./","link_testFile1.txt"))
|
||||
|
||||
""" link already exist"""
|
||||
def test_symlink_already_exist(self):
|
||||
os.mknod(os.path.join("./","testFile2.txt"))
|
||||
os.mknod(os.path.join("./","link_testFile2.txt"))
|
||||
app.symlink_force(os.path.join("./","testFile2.txt"),os.path.join("./","link_testFile2.txt"))
|
||||
os.remove(os.path.join("./","testFile2.txt"))
|
||||
os.remove(os.path.join("./","link_testFile2.txt"))
|
||||
|
||||
def test_valid_env(self):
|
||||
key = 'ENV_1'
|
||||
|
||||
Reference in New Issue
Block a user