Merge pull request #31 from sneakypete81/minor_fixes

Minor fixes
This commit is contained in:
sneakypete81 2013-04-28 10:25:26 -07:00
commit b2f6863c2b
2 changed files with 5 additions and 5 deletions

View file

@ -9,7 +9,7 @@ A computer, Python 2.7 and an empty OpenPhoto instance.
--------------------------------------- ---------------------------------------
<a name="setup"></a> <a name="setup"></a>
### Setting up ### Setting up
Create a tests/tokens.py file containing the following: Create a tests/tokens.py file containing the following:
@ -34,7 +34,9 @@ The "-c" lets you stop the tests gracefully with \[CTRL\]-c.
The easiest way to run a subset of the tests is with nose: The easiest way to run a subset of the tests is with nose:
cd /path/to/openphoto-python cd /path/to/openphoto-python
nosetests -v -s tests/test_albums.py:TestAlbums.test_view nosetests -v -s --nologcapture tests/test_albums.py:TestAlbums.test_view
All HTTP requests and responses are recorded in the file "tests.log".
--------------------------------------- ---------------------------------------
<a name="test_details"></a> <a name="test_details"></a>

View file

@ -7,12 +7,11 @@ try:
except ImportError: except ImportError:
print ("********************************************************************\n" print ("********************************************************************\n"
"You need to create a 'tokens.py' file containing the following:\n\n" "You need to create a 'tokens.py' file containing the following:\n\n"
" host = \"<test_url>\"\n" " host = \"<hostname>\"\n"
" consumer_key = \"<test_consumer_key>\"\n" " consumer_key = \"<test_consumer_key>\"\n"
" consumer_secret = \"<test_consumer_secret>\"\n" " consumer_secret = \"<test_consumer_secret>\"\n"
" token = \"<test_token>\"\n" " token = \"<test_token>\"\n"
" token_secret = \"<test_token_secret>\"\n" " token_secret = \"<test_token_secret>\"\n"
" host = \"<hostname>\"\n\n"
"WARNING: Don't use a production OpenPhoto instance for this!\n" "WARNING: Don't use a production OpenPhoto instance for this!\n"
"********************************************************************\n") "********************************************************************\n")
raise raise
@ -27,7 +26,6 @@ class TestBase(unittest.TestCase):
unittest.TestCase.__init__(self, *args, **kwds) unittest.TestCase.__init__(self, *args, **kwds)
self.photos = [] self.photos = []
LOG_FILENAME = "tests.log"
logging.basicConfig(filename="tests.log", logging.basicConfig(filename="tests.log",
filemode="w", filemode="w",
format="%(message)s", format="%(message)s",