Permalink
Browse files

Altered the random names generated in the unit tests

I figured prepending "pychallonge" to the names in the unit tests
would make it slightly more obvious that it isn't (technically) spam
if someone happens to be looking at e.g. the
[public tournament list](http://challonge.com/tournament).
  • Loading branch information...
Russ Amos
Russ Amos committed Jul 31, 2011
1 parent cca3ace commit 3caf1693c31b3e72d77c5403c58e1ca9ac574572
Showing with 3 additions and 2 deletions.
  1. +1 −1 .gitignore
  2. +2 −1 tests.py
View
@@ -1,2 +1,2 @@
*.pyc
-.idea
+.idea
View
@@ -8,7 +8,7 @@
def _get_random_name():
- return ''.join(random.choice(string.ascii_lowercase) for x in xrange(0, 20))
+ return "pychallonge_" + "".join(random.choice(string.ascii_lowercase) for x in xrange(0, 15))
def _remove_dates(d):
"""Removes created-at and updated-at attributes, for easier testing.
@@ -32,6 +32,7 @@ def setUp(self):
if not self.username or not self.api_key:
raise RuntimeError("You must add CHALLONGE_USER and CHALLONGE_KEY \
to your environment variables to run the test suite")
+
def test_set_credentials(self):
challonge.set_credentials(self.username, self.api_key)
self.assertEqual(api._auth_info.user, self.username)

0 comments on commit 3caf169

Please sign in to comment.