Acknowledge that some attributes/parameters are variant dictionaries

This commit is contained in:
Vincent Jacques
2012-05-31 19:12:10 +01:00
parent c4bb0e9555
commit 94b12a18f4
9 changed files with 26 additions and 13 deletions
@@ -11,6 +11,9 @@
{% if parameter.type.name == "bool" %}
assert isinstance( {{ parameter.name }}, bool ), {{ parameter.name }}
{% endif %}
{% if parameter.type.name == "dict" %}
assert isinstance( {{ parameter.name }}, dict ), {{ parameter.name }}
{% endif %}
{% else %}
assert isinstance( {{ parameter.name }}, {{ parameter.type.name }}.{{ parameter.type.name }} ), {{ parameter.name }}
{% endif %}
@@ -46,6 +49,9 @@
{% if parameter.type.name == "bool" %}
assert {{ parameter.name }} is GithubObject.NotSet or isinstance( {{ parameter.name }}, bool ), {{ parameter.name }}
{% endif %}
{% if parameter.type.name == "dict" %}
assert {{ parameter.name }} is GithubObject.NotSet or isinstance( {{ parameter.name }}, dict ), {{ parameter.name }}
{% endif %}
{% else %}
assert {{ parameter.name }} is GithubObject.NotSet or isinstance( {{ parameter.name }}, {{ parameter.type.name }}.{{ parameter.type.name }} ), {{ parameter.name }}
{% endif %}