Skip to content

Commit

Permalink
Add tests.test_task with basic test for activity registration
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Leclercq committed Jul 16, 2014
1 parent 89131c6 commit c5e28f2
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/test_task.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from simpleflow import activity


@activity.with_attributes(task_list='test')
def increment(x):
return x + 1


@activity.with_attributes(task_list='test')
def double(x):
return x * 2


@activity.with_attributes(task_list='test')
def square(x):
return x * x


print increment.name

def test_task_register():
from simpleflow import task

assert task.registry['test'] == [increment, double, square]

0 comments on commit c5e28f2

Please sign in to comment.