Skip to content
Browse files

Moving things around

  • Loading branch information...
1 parent 4c5e4dd commit 3251d0e73df9dfd0b1809f6b92286d565bc99cc1 @adamdeprince committed Jul 1, 2011
Showing with 19 additions and 57 deletions.
  1. +1 −0 pygox/__init__.py
  2. +0 −57 pygox_util.py
  3. +18 −0 setup.py
  4. 0 { → tests}/pygox_test.py
View
1 pygox/__init__.py
@@ -0,0 +1 @@
+from pygox.pygox import *
View
57 pygox_util.py
@@ -1,57 +0,0 @@
-import unittest
-
-class TestSellOrder(unittest.TestCase):
- SELL_ORDER="{u'status': u'Your order has been queued for execution', u'orders': [{u'status': 2, u'priority': u'1309529776562400', u'i
-tem': u'BTC', u'price': 20, u'oid': u'57ab542d-6386-49e1-b5e7-377af4658871', u'dark': 0, u'currency': u'USD', u'amount':
-Decimal('0.01'), u'date': 1309529776, u'type': 1}]}"
-
- def setUp(self):
- self.so = SellOrder.parse(parse_order(SELL_ORDER))
- self.order = self.so[0]
-
- def test_amount(self):
- self.assertEquals(self.so.amount, decimal.Decimal('0.01'))
-
- def test_amount_type(self):
- self.assertTrue(isinstance(self.so.amount, decimal.Decimal))
-
- def test_currency(self):
- self.assertTrue(self.so.currency, 'USD')
-
- def test_date(
-
- def test_parsed_file_has_one_orer(self):
- self.assertEquals(len(self.so), 1)
-
- def test_status_message(self):
- self.assertEquals(self.so.message, 'Your order has been queued for execution')
-
- def test_status(self):
- self.assertEquals(self.so.status, 2)
-
- def test_priority(self):
- self.assertEquals(self.so.priority, long(1309529776562400))
-
- def test_priortiy_is_correct_type(self):
- self.assertTrue(isinstance(self.so.priority, (int, long)))
-
- def test_item(self):
- self.assertEquals(self.so.item, 'BTC')
-
- def test_price(self):
- self.assertEquals(self.so.price, decimal.Decimal('20'))
-
- def test_price_type(self):
- self.assertTrue(isinstantce(self.so.price, decimal.Decimal))
-
- def test_oid(self):
- self.assertEquals(self.so.oid, '57ab542d-6386-49e1-b5e7-377af4658871')
-
- def test_dark(self):
- self.assertEquals(self.dark, False)
-
- def test_dark_type(self):
- self.assertTrue(isinstance(self.dark, bool))
-
-
-
View
18 setup.py
@@ -0,0 +1,18 @@
+import os
+from setuptools import setup
+
+def read(fname):
+ return open(os.path.join(os.path.dirname(__file__), fname)).read()
+
+setup(
+ name = "pygox",
+ version = "0.0.0",
+ author = "Adam DePrince",
+ author_email = "deprince@googlealumni.com",
+ description = "A API to MtGox",
+ license = "GPLV3",
+ keywords = "btc bitcoin mtgox",
+ url = "http://adamdeprince.com/pygox",
+ packages=['pygox'],
+ # long_description=read('README'),
+)
View
0 pygox_test.py → tests/pygox_test.py
File renamed without changes.

0 comments on commit 3251d0e

Please sign in to comment.
Something went wrong with that request. Please try again.