Test IssueEvent attributes

This commit is contained in:
Vincent Jacques
2012-05-20 13:08:17 +01:00
parent fd18d6299d
commit beaa58ca0c
6 changed files with 52 additions and 20 deletions
+8 -1
View File
@@ -3,6 +3,7 @@
import PaginatedList
from GithubObject import *
import Issue
import NamedUser
class IssueEvent( object ):
@@ -81,14 +82,20 @@ class IssueEvent( object ):
assert isinstance( attributes[ "actor" ], dict )
self.__actor = NamedUser.NamedUser( self.__requester, attributes[ "actor" ], completion = LazyCompletion )
if "commit_id" in attributes and attributes[ "commit_id" ] is not None:
assert isinstance( attributes[ "commit_id" ], ( str, unicode ) )
self.__commit_id = attributes[ "commit_id" ]
if "created_at" in attributes and attributes[ "created_at" ] is not None:
assert isinstance( attributes[ "created_at" ], ( str, unicode ) )
self.__created_at = attributes[ "created_at" ]
if "event" in attributes and attributes[ "event" ] is not None:
assert isinstance( attributes[ "event" ], ( str, unicode ) )
self.__event = attributes[ "event" ]
if "id" in attributes and attributes[ "id" ] is not None:
assert isinstance( attributes[ "id" ], int )
self.__id = attributes[ "id" ]
if "issue" in attributes and attributes[ "issue" ] is not None:
self.__issue = attributes[ "issue" ]
assert isinstance( attributes[ "issue" ], dict )
self.__issue = Issue.Issue( self.__requester, attributes[ "issue" ], completion = LazyCompletion )
if "url" in attributes and attributes[ "url" ] is not None:
assert isinstance( attributes[ "url" ], ( str, unicode ) )
self.__url = attributes[ "url" ]