import os
import unittest


def make(file_name):
    def test(self):
        self.assertTrue(1)
    return test


class ExamplesTest(unittest.TestCase):
    pass


here = os.path.dirname(__file__)

for file_name in os.listdir(os.path.join(here, 'logs')):
    test_name = 'test_' + file_name.rsplit('.', 1)[0]
    print 'adding:', test_name
    setattr(ExamplesTest, test_name, make(file_name))

@@ -23,76 +23,1110 @@
 est%0A
-%0A%0Adef make(file_name):%0A    def test(self):%0A        self.assertTrue(1
+import json%0Afrom boto.swf.layer1 import Layer1%0Aimport workflows%0Afrom flowy.swf.boilerplate import start_workflow_worker%0Afrom itertools import cycle%0A%0A%0Aclass MockLayer1(Layer1):%0A%0A    def __init__(self, responses, requests):%0A        self.responses = cycle(responses)%0A        self.requests = cycle(requests)%0A%0A    def json_request(self, action, data, object_hook=None):%0A        return next(self.responses)%0A%0A%0Adef make(file_name):%0A    f = open(os.path.join(here, 'logs', file_name))%0A    responses = %5B%5D%0A    requests = %5B%5D%0A    for line in f:%0A        line = line.split('%5Ct')%0A        if line%5B0%5D == '%3C%3C%3C':%0A            res = json.loads(line%5B1%5D)%0A            if res is not None:%0A                responses.append(res)%0A        else:%0A            requests.append((line%5B1%5D, json.loads(line%5B2%5D)))%0A%0A    mock_layer1 = MockLayer1(responses, requests)%0A%0A    def test(self):%0A        start_workflow_worker('TestDomain', 'test_list',%0A                              layer1=mock_layer1,%0A                              reg_remote=False,%0A                              package=workflows,%0A                              loop=10)%0A    f.close(
 )%0A  
@@ -1280,16 +1280,20 @@
 'logs'))
+%5B:8%5D
 :%0A    te

Work on integration tests