py4shared / py4shared / rest_tests.py

import logging
import logging.handlers
from random import randint
try:
    import unittest2 as unittest
except ImportError:
    import unittest

from py4shared.rest import REST4Shared
from py4shared.utils import md5sum


LOG_FILENAME = 'py4shared_rest.log'
logger = logging.getLogger('suds.client')
logger.setLevel(logging.DEBUG)
handler = logging.handlers.WatchedFileHandler(LOG_FILENAME)
logger.addHandler(handler)


class REST4SharedTestCase(unittest.TestCase):
    def setUp(self):
        # Using per application configuration dictionary:
        self.params = {
            'app1': {
                'oauth_consumer_key': '7093f6ad649a3baa2fe0e595b49c24c3'
            },
            'app2': {
                'oauth_consumer_key': ''
            }
        }

        # Using per user api wrapper instance:
        self.restapi1 = REST4Shared(self.params['app1']['oauth_consumer_key'])
        self.restapi2 = REST4Shared(self.params['app2']['oauth_consumer_key'])

    def test_001_user(self):
        pass

    def test_002_users(self):
        pass

    def test_003_folders(self):
        pass

    def test_004_files(self):
        pass


if __name__ == '__main__':
    unittest.main()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.