Skip to content

Commit aa4d93d

Browse files
committed
shortener WIP
1 parent 04ed9e3 commit aa4d93d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

links/test_shortener.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,12 @@ def test_update_htaccess():
136136
PathURL('23', 'https://new.site/', True),
137137
PathURL('24', 'https://other.new.site/', True)
138138
]
139-
given = io.StringIO(SAMPLE_HTACCESS)
140-
given.seek(0, io.SEEK_END) # emulate append mode
139+
htac = io.StringIO(SAMPLE_HTACCESS)
140+
htac.seek(0, io.SEEK_END) # emulate append mode 'a+'
141141
with mock.patch('shortener.timestamp', return_value=FROZEN_TIME):
142-
res = update_htaccess(given, directives)
142+
res = update_htaccess(htac, directives)
143143
assert res == 2
144-
assert given.getvalue() == UPDATED_SAMPLE_HTACCESS
144+
assert htac.getvalue() == UPDATED_SAMPLE_HTACCESS
145145

146146

147147
def test_gen_short():

0 commit comments

Comments
 (0)