diff --git a/google/refine/refine.py b/google/refine/refine.py index 7b0b627..cc70df7 100644 --- a/google/refine/refine.py +++ b/google/refine/refine.py @@ -21,6 +21,7 @@ from google.refine import facet REFINE_PORT = os.environ.get('GOOGLE_REFINE_PORT', '3333') REFINE_HOST = os.environ.get('GOOGLE_REFINE_HOST', '127.0.0.1') + class RefineServer(object): """Communicate with a Refine server.""" @@ -155,6 +156,7 @@ def RowsResponseFactory(column_index): Uses the project's model's row cell index so that a row can be used as a dict by column name.""" + print 'COL_IND', column_index class RowsResponse(object): class RefineRows(object): class RefineRow(object): diff --git a/google/test/test_facet.py b/google/test/test_facet.py index bb32c3c..9d2f838 100644 --- a/google/test/test_facet.py +++ b/google/test/test_facet.py @@ -11,6 +11,27 @@ import unittest from google.refine.facet import * +class CamelTest(unittest.TestCase): + def test_to_camel(self): + pairs = ( + ('this', 'this'), + ('this_attr', 'thisAttr'), + ('From', 'from'), + ) + for attr, camel_attr in pairs: + self.assertEqual(to_camel(attr), camel_attr) + + def test_from_camel(self): + pairs = ( + ('this', 'this'), + ('This', 'this'), + ('thisAttr', 'this_attr'), + ('ThisAttr', 'this_attr'), + ('From', 'from'), + ) + for camel_attr, attr in pairs: + self.assertEqual(from_camel(camel_attr), attr) + class FacetTest(unittest.TestCase): def test_init(self): facet = TextFacet('column name') diff --git a/google/test/test_refine.py b/google/test/test_refine.py index d059470..595517f 100644 --- a/google/test/test_refine.py +++ b/google/test/test_refine.py @@ -14,28 +14,6 @@ from google.refine import facet PATH_TO_TEST_DATA = os.path.join('google', 'test', 'data') -class CamelTest(unittest.TestCase): - def test_to_camel(self): - pairs = ( - ('this', 'this'), - ('this_attr', 'thisAttr'), - ('From', 'from'), - ) - for attr, camel_attr in pairs: - self.assertEqual(facet.to_camel(attr), camel_attr) - - def test_from_camel(self): - pairs = ( - ('this', 'this'), - ('This', 'this'), - ('thisAttr', 'this_attr'), - ('ThisAttr', 'this_attr'), - ('From', 'from'), - ) - for camel_attr, attr in pairs: - self.assertEqual(facet.from_camel(camel_attr), attr) - - class RefineTestCase(unittest.TestCase): project_file = None project_file_options = {}