Skip to content

Commit f1f746b

Browse files
committed
Rename test_generator.py to test_stream_generator.py
1 parent 5920690 commit f1f746b

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

st2common/tests/unit/test_generator.py renamed to st2common/tests/unit/test_stream_generator.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,14 @@
1515

1616
import mock
1717
import unittest2
18+
1819
from st2common.stream import listener
1920

21+
INCLUDE = "test"
22+
END_EVENT = "test_end_event"
23+
END_ID = "test_end_id"
24+
EVENTS = [(INCLUDE, MockBody("notend")), (END_EVENT, MockBody(END_ID))]
25+
2026

2127
class MockBody(object):
2228

@@ -25,12 +31,6 @@ def __init__(self, id):
2531
self.status = "succeeded"
2632

2733

28-
INCLUDE = "test"
29-
END_EVENT = "test_end_event"
30-
END_ID = "test_end_id"
31-
EVENTS = [(INCLUDE, MockBody("notend")), (END_EVENT, MockBody(END_ID))]
32-
33-
3434
class MockQueue():
3535

3636
def __init__(self):
@@ -71,7 +71,3 @@ def test_generator(self, mock_queue,
7171
events = EVENTS.append('')
7272
for index, val in enumerate(app_iter):
7373
self.assertEquals(val, events[index])
74-
75-
76-
if __name__ == "__main__":
77-
unittest2.main()

0 commit comments

Comments
 (0)