You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by jo...@apache.org on 2014/01/29 01:48:51 UTC
svn commit: r1562333 -
/incubator/climate/trunk/ocw-ui/backend/tests/test_local_file_metadata_extractors.py
Author: joyce
Date: Wed Jan 29 00:48:50 2014
New Revision: 1562333
URL: http://svn.apache.org/r1562333
Log:
CLIMATE-326 - Add successful variable extraction test
Modified:
incubator/climate/trunk/ocw-ui/backend/tests/test_local_file_metadata_extractors.py
Modified: incubator/climate/trunk/ocw-ui/backend/tests/test_local_file_metadata_extractors.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/ocw-ui/backend/tests/test_local_file_metadata_extractors.py?rev=1562333&r1=1562332&r2=1562333&view=diff
==============================================================================
--- incubator/climate/trunk/ocw-ui/backend/tests/test_local_file_metadata_extractors.py (original)
+++ incubator/climate/trunk/ocw-ui/backend/tests/test_local_file_metadata_extractors.py Wed Jan 29 00:48:50 2014
@@ -152,5 +152,18 @@ class TestTimeExtraction(unittest.TestCa
self.assertDictEqual(expected_return, json)
self.assertEqual(callback, "test_callback")
+class TestVariableExtraction(unittest.TestCase):
+ def test_successful_variable_extraact(self):
+ expected_return = {
+ 'success': True,
+ 'variables': ['lat', 'lon', 'time']
+ }
+
+ file_location = os.path.abspath('tests/example_data/lat_lon_time.nc')
+
+ response = test_app.get('/lfme/list_vars/' + file_location)
+
+ self.assertDictEqual(expected_return, response.json)
+
if __name__ == '__main__':
unittest.main()