climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1562284 - /incubator/climate/trunk/ocw-ui/backend/tests/test_local_file_metadata_extractors.py
Date Tue, 28 Jan 2014 22:21:12 GMT
Author: joyce
Date: Tue Jan 28 22:21:12 2014
New Revision: 1562284

URL: http://svn.apache.org/r1562284
Log:
CLIMATE-326 - Add failure time extract 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=1562284&r1=1562283&r2=1562284&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 Tue
Jan 28 22:21:12 2014
@@ -98,5 +98,17 @@ class TestTimeExtraction(unittest.TestCa
 
         self.assertDictEqual(expected_return, response.json)
 
+    def test_failure_time_extract(self):
+        expected_return = {
+            "success": False,
+            "variables": ["invalid_lon", "invalid_time", "invalid_lat"]
+        } 
+
+        file_location = os.path.abspath('tests/example_data/lat_lon_time_invalid.nc')
+
+        response = test_app.get('/lfme/list_time/' + file_location)
+
+        self.assertDictEqual(expected_return, response.json)
+
 if __name__ == '__main__':
     unittest.main()



Mime
View raw message