Merge "ssh.py: add flag to keep stdin open"
[yardstick.git] / tests / unit / cmd / commands / test_env.py
1 ##############################################################################
2 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9 import unittest
10 import mock
11
12 from yardstick.cmd.commands.env import EnvCommand
13
14
15 class EnvCommandTestCase(unittest.TestCase):
16
17     @mock.patch('yardstick.cmd.commands.env.HttpClient')
18     def test_do_influxdb(self, mock_http_client):
19         env = EnvCommand()
20         env.do_influxdb({})
21         self.assertTrue(mock_http_client().post.called)
22
23
24 def main():
25     unittest.main()
26
27
28 if __name__ == '__main__':
29     main()