Merge "Fix PEP8 errors in prox_binseach"
[yardstick.git] / yardstick / tests / unit / network_services / traffic_profile / test_http.py
1 # Copyright (c) 2016-2017 Intel Corporation
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 #
15
16 import unittest
17
18 from yardstick.network_services.traffic_profile.base import TrafficProfile
19 from yardstick.network_services.traffic_profile.http import \
20     TrafficProfileGenericHTTP
21
22
23 class TestTrafficProfileGenericHTTP(unittest.TestCase):
24     def test___init__(self):
25         traffic_profile_generic_htt_p = \
26             TrafficProfileGenericHTTP(TrafficProfile)
27         self.assertIsNotNone(traffic_profile_generic_htt_p)
28
29     def test_execute(self):
30         traffic_profile_generic_htt_p = \
31             TrafficProfileGenericHTTP(TrafficProfile)
32         traffic_generator = {}
33         self.assertIsNone(
34             traffic_profile_generic_htt_p.execute(traffic_generator))
35
36     def test__send_http_request(self):
37         traffic_profile_generic_htt_p = \
38                 TrafficProfileGenericHTTP(TrafficProfile)
39         self.assertIsNone(traffic_profile_generic_htt_p._send_http_request(
40                              "10.1.1.1", "250", "/req"))