climate-commits mailing list archives

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

URL: http://svn.apache.org/r1562264
Log:
CLIMATE-326 - Add successful lfme/list_latlon 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=1562264&r1=1562263&r2=1562264&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:19:18 2014
@@ -1,3 +1,4 @@
+import os
 import unittest
 from webtest import TestApp
 
@@ -9,7 +10,21 @@ test_app = TestApp(app)
 
 class TestLatLonExtraction(unittest.TestCase):
     def test_successful_latlon_extract(self):
-        pass
+        expected_return = {
+            "success": True,
+            "lat_name": "lat",
+            "lon_name": "lon",
+            "lat_min": -45.759998321533203,
+            "lat_max": -45.759998321533203,
+            "lon_min": -24.639999389648438,
+            "lon_max": 60.279998779296875
+        }
+
+        file_location = os.path.abspath('tests/example_data/lat_lon_time.nc')
+
+        response = test_app.get('/lfme/list_latlon/' + file_location)
+
+        self.assertDictEqual(expected_return, response.json)
 
     def test_failure_latlon_extract(self):
         pass



Mime
View raw message