Skip to content

Commit f4bc6a3

Browse files
committed
nicer test code
1 parent b0a02af commit f4bc6a3

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

graphql/execution/tests/test_tracing.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,10 @@
77
GraphQLID, GraphQLInt, GraphQLList, GraphQLNonNull,
88
GraphQLObjectType, GraphQLSchema, GraphQLString)
99

10-
current_time = -1
11-
1210

1311
def test_tracing_result(mocker):
14-
15-
def get_time():
16-
global current_time
17-
current_time += 1
18-
return current_time
19-
2012
time_mock = mocker.patch('time.time')
21-
time_mock.side_effect = get_time
13+
time_mock.side_effect = range(0, 10000)
2214

2315
BlogImage = GraphQLObjectType('BlogImage', {
2416
'url': GraphQLField(GraphQLString),

0 commit comments

Comments
 (0)