Permalink
Browse files

save_content -> save

  • Loading branch information...
1 parent 2822436 commit d1fa22e1956c0565aaa5fcc38376f800633c1233 @baverman committed Mar 24, 2013
Showing with 3 additions and 3 deletions.
  1. +2 −2 swoop/response.py
  2. +1 −1 tests/test_swoop.py
View
@@ -31,11 +31,11 @@ def content(self):
self._content = self.raw_content.decode(self.encoding)
return self._content
- def save_content(self, filename):
+ def save(self, filename):
with open(filename, mode='w') as f:
f.write(self.raw_content)
- return filename
+ return self
def form(self, action=None, id=None, idx=None, name=None, submit=True, values=None):
return get_request_for_form(self, action=action, id=id, idx=idx, name=name, submit=submit,
View
@@ -4,6 +4,6 @@ def test_simple():
s = Session(debuglevel=1)
r = s('http://fansubs.ru')
r = r.form(idx=0, values={'query':'haruhi'}).fetch()
- r.save_content('/tmp/wow.html')
+ r.save('/tmp/wow.html')
assert False

0 comments on commit d1fa22e

Please sign in to comment.