removed protocol cruft from transaction transform days.

This commit is contained in:
fawce
2012-05-28 21:32:23 -04:00
parent 13ccf169f1
commit 069dbd1afe
5 changed files with 13 additions and 88 deletions
+6 -15
View File
@@ -1,5 +1,5 @@
"""
Test the FRAME/UNFRAME functions in the sequence expected from ziplines.
Test the FRAME/UNFRAME functions in the sequence expected from ziplines.
"""
import pytz
@@ -36,10 +36,10 @@ class ProtocolTestCase(TestCase):
one_day_td = timedelta(days=1)
trades = factory.create_trade_history(
sid,
price,
volume,
one_day_td,
sid,
price,
volume,
one_day_td,
self.trading_environment
)
@@ -92,7 +92,7 @@ class ProtocolTestCase(TestCase):
self.assertEqual(order.sid, 133)
self.assertEqual(order.amount, 100)
self.assertEqual(order.dt, now)
#order datasource datasource frames the order
order_event = zp.ndict({
"sid" : order.sid,
@@ -118,12 +118,3 @@ class ProtocolTestCase(TestCase):
'price' : 10.0,
'commission' : 0.50
})
#frame that transaction
txn_msg = zp.TRANSFORM_FRAME(zp.TRANSFORM_TYPE.TRANSACTION, txn)
#unframe
recovered_tx = zp.TRANSFORM_UNFRAME(txn_msg).TRANSACTION
self.assertEqual(recovered_tx.sid, 133)
self.assertEqual(recovered_tx.amount, 100)