diff --git a/google/refine/refine.py b/google/refine/refine.py index c2ad6c1..feaabb1 100644 --- a/google/refine/refine.py +++ b/google/refine/refine.py @@ -18,8 +18,8 @@ import urlparse 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') +REFINE_PORT = os.environ.get('GOOGLE_REFINE_PORT', '3333') class RefineServer(object): @@ -156,7 +156,6 @@ 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 9d2f838..7f4204a 100644 --- a/google/test/test_facet.py +++ b/google/test/test_facet.py @@ -1,6 +1,6 @@ #!/usr/bin/env python """ -test_engine.py +test_facet.py """ # Copyright (c) 2011 Paul Makepeace, Real Programmers. All rights reserved. @@ -32,6 +32,7 @@ class CamelTest(unittest.TestCase): 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') @@ -120,4 +121,4 @@ class FacetTest(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/google/test/test_refine.py b/google/test/test_refine.py index 4ce2e89..cd22e35 100644 --- a/google/test/test_refine.py +++ b/google/test/test_refine.py @@ -1,6 +1,15 @@ #!/usr/bin/env python """ test_refine.py + +The tests here are based on David Huynh's Refine tutorial at +http://davidhuynh.net/spaces/nicar2011/tutorial.pdf The tests perform all +the Refine actions given in the tutorial (except the web scraping) and verify +the changes expected to observe explained in the tutorial. + +These tests require a connection to a Refine server either at +http://127.0.0.1:3333/ or by specifying environment variables REFINE_HOST +and REFINE_PORT. """ # Copyright (c) 2011 Paul Makepeace, Real Programmers. All rights reserved. @@ -455,4 +464,4 @@ class TutorialTestTransposeVariableNumbeOfRowsIntoColumns(RefineTestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main()