mirror of
https://github.com/certbot/certbot.git
synced 2026-06-09 08:42:57 -04:00
Don't call our tempfile "tempfile"
This commit is contained in:
parent
33a4acf6eb
commit
dd14b9980e
1 changed files with 6 additions and 6 deletions
|
|
@ -746,18 +746,18 @@ class RenewableCertTests(BaseRenewableCertTest):
|
|||
# Mostly tested by the process of creating and updating lineages,
|
||||
# but we can test that this successfully creates files, removes
|
||||
# unneeded items, and preserves comments.
|
||||
tempfile = os.path.join(self.tempdir, "sample-file")
|
||||
tempfile2 = os.path.join(self.tempdir, "sample-file.new")
|
||||
with open(tempfile, "w") as f:
|
||||
temp = os.path.join(self.tempdir, "sample-file")
|
||||
temp2 = os.path.join(self.tempdir, "sample-file.new")
|
||||
with open(temp, "w") as f:
|
||||
f.write("[renewalparams]\nuseful = value # A useful value\n"
|
||||
"useless = value # Not needed\n")
|
||||
target = {}
|
||||
for x in ALL_FOUR:
|
||||
target[x] = "somewhere"
|
||||
relevant = {"useful": "new_value"}
|
||||
relevant_data = {"useful": "new_value"}
|
||||
from letsencrypt import storage
|
||||
storage.write_renewal_config(tempfile, tempfile2, target, relevant)
|
||||
with open(tempfile2, "r") as f:
|
||||
storage.write_renewal_config(temp, temp2, target, relevant_data)
|
||||
with open(temp2, "r") as f:
|
||||
content = f.read()
|
||||
# useful value was updated
|
||||
assert "useful = new_value" in content
|
||||
|
|
|
|||
Loading…
Reference in a new issue