We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04ed9e3 commit aa4d93dCopy full SHA for aa4d93d
links/test_shortener.py
@@ -136,12 +136,12 @@ def test_update_htaccess():
136
PathURL('23', 'https://new.site/', True),
137
PathURL('24', 'https://other.new.site/', True)
138
]
139
- given = io.StringIO(SAMPLE_HTACCESS)
140
- given.seek(0, io.SEEK_END) # emulate append mode
+ htac = io.StringIO(SAMPLE_HTACCESS)
+ htac.seek(0, io.SEEK_END) # emulate append mode 'a+'
141
with mock.patch('shortener.timestamp', return_value=FROZEN_TIME):
142
- res = update_htaccess(given, directives)
+ res = update_htaccess(htac, directives)
143
assert res == 2
144
- assert given.getvalue() == UPDATED_SAMPLE_HTACCESS
+ assert htac.getvalue() == UPDATED_SAMPLE_HTACCESS
145
146
147
def test_gen_short():
0 commit comments