mirror of
https://github.com/newtype256/esgi-devops.git
synced 2025-06-04 06:36:26 +02:00
cours: exercice 2
This commit is contained in:
parent
57b40c4683
commit
f157d9c4fb
1 changed files with 3 additions and 2 deletions
|
@ -7,7 +7,6 @@ class UnixFS:
|
|||
os.remove(filename)
|
||||
|
||||
# Sans intégration
|
||||
|
||||
def test_monkeypatche(mocker):
|
||||
mocker.patch('os.remove')
|
||||
UnixFS.rm('contrôle complet')
|
||||
|
@ -21,4 +20,6 @@ def test_db_with_db():
|
|||
fp.seek(0)
|
||||
assert fp.read() == b'Bonjour!'
|
||||
UnixFS.rm(fp.name)
|
||||
# assert que le fichier a été supprimé.
|
||||
# Exercice: assert que le fichier a été supprimé.
|
||||
# assert not os.access(fp.name)?
|
||||
# https://docs.python.org/fr/3/library/os.html
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue