Skip to content

Commit 8dd27e6

Browse files
author
vbuell
committed
initial work for eip
1 parent 64de2e4 commit 8dd27e6

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

eip_tests.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import random
2+
import unittest
3+
import peiping
4+
5+
class TestEip(unittest.TestCase):
6+
7+
def simple_generator(self):
8+
for i in range(10):
9+
yield i
10+
11+
def read_file(self, filename):
12+
file = open(filename, 'rb')
13+
return file.read()
14+
15+
def test_0(self):
16+
print peiping.endpoint(self.simple_generator()).to("")
17+
peiping.run()
18+
19+
20+
if __name__ == '__main__':
21+
unittest.main()

peiping.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class Endpoint():
2+
def to(self, object):
3+
print type(object)
4+
if type(object) is str:
5+
endpoint = endpoint_factory(str)
6+
pass
7+
8+
def endpoint(object):
9+
return Endpoint()
10+
11+
def run():
12+
for route in routes:
13+
route.run()

0 commit comments

Comments
 (0)