]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Fix abbreviated TestPCPTask.test_end()
authorZack Cerza <zack@redhat.com>
Tue, 31 May 2016 15:45:32 +0000 (09:45 -0600)
committerZack Cerza <zack@redhat.com>
Tue, 31 May 2016 17:31:11 +0000 (11:31 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/test/task/test_pcp.py

index 3c0ab6b1b9815cefe8c84436fc0f95efabed3239..3d4dde0cfe911a683a91620d98496f31eb3ae40b 100644 (file)
@@ -353,11 +353,12 @@ class TestPCPTask(TestTask):
     @patch('teuthology.task.pcp.GrafanaGrapher')
     @patch('teuthology.task.pcp.GraphiteGrapher')
     def test_end(self, m_grafana, m_graphite, m_makedirs):
-        with self.klass(self.ctx, self.task_config) as task:
-            pass
-        assert isinstance(task.stop_time, int)
-        return
-        self.task_config['graphite'] = True
         self.ctx.archive = '/fake/path'
         with self.klass(self.ctx, self.task_config) as task:
+            # begin() should have called write_html() once by now, with no args
             task.graphite.write_html.assert_called_once_with()
+        # end() should have called write_html() a second time by now, with
+        # mode=static
+        second_call = task.graphite.write_html.call_args_list[1]
+        assert second_call[1]['mode'] == 'static'
+        assert isinstance(task.stop_time, int)