Skip to content

Commit 258d133

Browse files
committed
Added a unit test for Pomf
Last time I contributed, Pomf was semi-broken as any upload with no extension would return the same broken url and Uguu was down so, unit tests couldn't be tested. I noticed that, adding a txt extension to the testfile, allows Pomf to accept the file upload.
1 parent 7e5da87 commit 258d133

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pyupload/tests/upload_test.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def generate_random_file_content():
1717
class TestUploadMethods(unittest.TestCase):
1818
def setUp(self):
1919
self.content = generate_random_file_content()
20-
self.filename = 'testfile'
20+
self.filename = 'testfile.txt'
2121
with open(self.filename, 'w') as f:
2222
f.write(self.content)
2323

@@ -33,6 +33,11 @@ def test_catbox(self):
3333
result = uploader.execute()
3434
self.compare(result)
3535

36+
def test_pomf(self):
37+
uploader = PomfUploader(self.filename)
38+
result = uploader.execute()
39+
self.compare(result)
40+
3641
def test_uguu(self):
3742
uploader = UguuUploader(self.filename)
3843
result = uploader.execute()

0 commit comments

Comments
 (0)