Permalink
Browse files

Reorganise project layout

  • Loading branch information...
1 parent 67b9c83 commit 5ad4b6f0d424240e186dc10a26ecd335b2ff0f7d @robyoung robyoung committed Feb 22, 2013
File renamed without changes.
File renamed without changes.
No changes.
File renamed without changes.
No changes.
File renamed without changes.
File renamed without changes.
@@ -2,4 +2,3 @@ flask
pymongo==2.4
python-dateutil < 2.0
pytz
-nose
File renamed without changes.
File renamed without changes.
View
No changes.
@@ -1,18 +1,20 @@
+import test_helper
+
import os
import unittest
from dateutil import parser
from flask import json
import pytz
-import api
+from performance_platform.read import api
DATABASE_NAME = 'performance_platform_test'
def load_fixture(collection_name, fixture_name):
- root_path = os.path.join(os.path.dirname(__file__), '..', '..')
- fixture_path = os.path.join(root_path, 'test', 'data', fixture_name)
+ test_path = os.path.join(os.path.dirname(__file__), '..')
+ fixture_path = os.path.join(test_path, 'fixtures', fixture_name)
with open(fixture_path) as fixture:
for document in json.load(fixture):
if '_timestamp' in document:
@@ -0,0 +1,6 @@
+import sys
+import os
+
+sys.path.append(
+ os.path.join(os.path.dirname(__file__), '..', '..')
+)
View
No changes.
@@ -1,11 +1,14 @@
+import test_helper
+
from datetime import datetime
import json
import unittest
from hamcrest import *
import pytz
-import api
from test_helpers import is_bad_request, is_ok
+from performance_platform.write import api
+
class PostDataTestCase(unittest.TestCase):
def stub_storage(self, bucket_name, data_to_store):
@@ -1,8 +1,10 @@
+import test_helper
+
import unittest
from hamcrest import *
from pymongo import MongoClient
-from api import DataStore
+from performance_platform.write.api import DataStore
TEST_DATABASE = 'performance_platform_test'
@@ -0,0 +1,6 @@
+import sys
+import os
+
+sys.path.append(
+ os.path.join(os.path.dirname(__file__), '..', '..')
+)
File renamed without changes.
@@ -1,12 +1,14 @@
+import test_helper
+
import unittest
from datetime import datetime
from hamcrest import *
import pytz
-import api
-from validators import value_is_valid_datetime_string, value_is_valid, \
- key_is_valid, value_is_valid_id
+from performance_platform.write import api
+from performance_platform.write.validators import value_is_valid_id, \
+ value_is_valid, key_is_valid, value_is_valid_datetime_string
class ValidKeysTestCase(unittest.TestCase):
@@ -1,4 +0,0 @@
-flask
-pymongo==2.4
-python-dateutil < 2.0
-pytz

0 comments on commit 5ad4b6f

Please sign in to comment.