add media tests
This commit is contained in:
parent
9eabc14b7c
commit
d3258e2da4
28
tests/test_media.py
Executable file
28
tests/test_media.py
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import unittest
|
||||
import util
|
||||
|
||||
|
||||
class TestMedia(unittest.TestCase):
|
||||
def runTest(self):
|
||||
filename = '_test.txt'
|
||||
data = 'test'
|
||||
|
||||
# storeMediaFile
|
||||
util.invoke('storeMediaFile', filename='_test.txt', data=data)
|
||||
|
||||
# retrieveMediaFile (part 1)
|
||||
media = util.invoke('retrieveMediaFile', filename=filename)
|
||||
self.assertEqual(media, data)
|
||||
|
||||
# deleteMediaFile
|
||||
util.invoke('deleteMediaFile', filename=filename)
|
||||
|
||||
# retrieveMediaFile (part 2)
|
||||
media = util.invoke('retrieveMediaFile', filename=filename)
|
||||
self.assertFalse(media)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
Loading…
Reference in New Issue
Block a user