Skip to content

Commit

Permalink
Add a new test, test_parameter_type_long, which demonstrates that pas…
Browse files Browse the repository at this point in the history
…sing parameters of type long when an int is expected, causes an exception.

ERROR: test_parameter_type_long (test.test_core.CoreTests)
...
ValueError: Bad value for parameter limit of type 'int' - 5
  • Loading branch information
msabramo committed Jun 1, 2011
1 parent 415e202 commit cde2a13
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/test_core.py
Expand Up @@ -157,6 +157,11 @@ def test_parameter_type_int(self):
self.assertEqual(self.last_query()['limit'], ['5'])


def test_parameter_type_long(self):
self.api.testMethod(test_id=1L, limit=5L)
self.assertEqual(self.last_query()['limit'], ['5'])


def bad_value_msg(self, name, t, v):
return "Bad value for parameter %s of type '%s' - %s" % (name, t, v)

Expand Down

0 comments on commit cde2a13

Please sign in to comment.