Skip to content

Commit

Permalink
Address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
twm committed Feb 2, 2021
1 parent 564a021 commit 96bd854
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/treq/test/test_multipart.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,26 @@ def test_unknownLength(self):
passed as a parameter without either a C{seek} or C{tell} method,
its C{length} attribute is set to C{UNKNOWN_LENGTH}.
"""
class HasSeek:
class CantTell:
def seek(self, offset, whence):
"""
A C{seek} method that is never called because there is no
matching C{tell} method.
"""

class HasTell:
class CantSeek:
def tell(self):
"""
A C{tell} method that is never called because there is no
matching C{seek} method.
"""

producer = MultiPartProducer(
{"f": ("name", None, FileBodyProducer(HasSeek()))})
{"f": ("name", None, FileBodyProducer(CantTell()))})
self.assertEqual(UNKNOWN_LENGTH, producer.length)

producer = MultiPartProducer(
{"f": ("name", None, FileBodyProducer(HasTell()))})
{"f": ("name", None, FileBodyProducer(CantSeek()))})
self.assertEqual(UNKNOWN_LENGTH, producer.length)

def test_knownLengthOnFile(self):
Expand Down

0 comments on commit 96bd854

Please sign in to comment.