File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 8
8
"""
9
9
from __future__ import unicode_literals
10
10
11
+ import copy
12
+
11
13
from .models import GitHubCore
12
14
13
15
@@ -31,6 +33,10 @@ class Event(GitHubCore):
31
33
"""
32
34
33
35
def _update_attributes (self , event ):
36
+ # If we don't copy this, then we end up altering _json_data which we do
37
+ # not want to do:
38
+ event = copy .deepcopy (event )
39
+
34
40
from .users import User
35
41
from .orgs import Organization
36
42
#: :class:`User <github3.users.User>` object representing the actor.
Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ def test_events(self):
117
117
118
118
for event in o .events ():
119
119
assert isinstance (event , github3 .events .Event )
120
+ assert isinstance (event .as_json (), str )
120
121
121
122
def test_members (self ):
122
123
"""Test the ability to retrieve an organization's members."""
You can’t perform that action at this time.
0 commit comments