chapter 2.4
This commit is contained in:
15
tests.py
15
tests.py
@@ -1,16 +1,9 @@
|
||||
from functions.get_file_content import get_file_content
|
||||
|
||||
from functions.write_file import write_file
|
||||
|
||||
def test():
|
||||
result = get_file_content("calculator", "main.py")
|
||||
print(result)
|
||||
|
||||
result = get_file_content("calculator", "pkg/calculator.py")
|
||||
print(result)
|
||||
|
||||
result = get_file_content("calculator", "/bin/cat")
|
||||
print(result)
|
||||
|
||||
print(write_file("calculator", "lorem.txt", "wait, this isn't lorem ipsum"))
|
||||
print(write_file("calculator", "pkg/morelorem.txt", "lorem ipsum dolor sit amet"))
|
||||
print(write_file("calculator", "/tmp/temp.txt", "this should not be allowed"))
|
||||
|
||||
if __name__ == "__main__":
|
||||
test()
|
||||
|
||||
Reference in New Issue
Block a user