BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etsy-python
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
etsy-python
Commits
f1ba36ee
Commit
f1ba36ee
authored
Jun 01, 2011
by
Dan McKinley
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2 from msabramo/master
Allow passing parameters of type long when an int is expected.
parents
415e202d
871cde8a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
_core.py
etsy/_core.py
+2
-0
test_core.py
test/test_core.py
+5
-0
No files found.
etsy/_core.py
View file @
f1ba36ee
...
...
@@ -62,6 +62,8 @@ class TypeChecker(object):
def
check_int
(
self
,
value
):
if
isinstance
(
value
,
long
):
return
True
,
value
return
isinstance
(
value
,
int
),
value
...
...
test/test_core.py
View file @
f1ba36ee
...
...
@@ -157,6 +157,11 @@ class CoreTests(Test):
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment