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/11/19 17:53:19 UTC

[04/21] climate git commit: CLIMATE-372 - Testing dap custom dataset name test

CLIMATE-372 - Testing dap custom dataset name test


Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/ddfe0692
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/ddfe0692
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/ddfe0692

Branch: refs/heads/master
Commit: ddfe06929cb738d2f73dfc8e3398ff642331adf2
Parents: 79fa8a6
Author: Michael Joyce <jo...@apache.org>
Authored: Mon Nov 17 09:23:52 2014 -0800
Committer: Michael Joyce <jo...@apache.org>
Committed: Mon Nov 17 09:23:52 2014 -0800

----------------------------------------------------------------------
 ocw/tests/test_dap.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/ddfe0692/ocw/tests/test_dap.py
----------------------------------------------------------------------
diff --git a/ocw/tests/test_dap.py b/ocw/tests/test_dap.py
index cdc75cd..be01f6c 100644
--- a/ocw/tests/test_dap.py
+++ b/ocw/tests/test_dap.py
@@ -23,7 +23,7 @@ import datetime as dt
 class TestDap(unittest.TestCase):
     @classmethod
     def setup_class(self):
-        dataset = dap.load('http://test.opendap.org/dap/data/nc/sst.mnmean.nc.gz', 'sst')
+        self.dataset = dap.load('http://test.opendap.org/dap/data/nc/sst.mnmean.nc.gz', 'sst', name='foo')
 
     def test_dataset_is_returned(self):
         self.assertTrue(isinstance(self.dataset, Dataset))
@@ -41,5 +41,8 @@ class TestDap(unittest.TestCase):
         start = dt.datetime(1854, 1, 1)
         self.assertTrue(start == self.dataset.times[0])
 
+    def test_custom_dataset_name(self):
+        self.assertEquals(self.dataset.name, 'foo')
+
 if __name__ == '__main__':
     unittest.main()