Tidy & add test_refine commentary.
This commit is contained in:
parent
bde4eb7466
commit
5f8437327a
|
@ -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):
|
||||
|
|
|
@ -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()
|
||||
unittest.main()
|
||||
|
|
|
@ -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()
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in New Issue