aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2017-09-23 14:31:10 +0800
committerFu Jinhua <fu.jinhua@zte.com.cn>2017-09-23 07:14:19 +0000
commit076025746738430b2f7071a8de937236d19ea1ba (patch)
tree1324bf5bfee500046db7b82d5c1f565af3b8abf7
parent6201aa651f798b4d805c6456220b132c82834d5c (diff)
Fix pep8 error for vfc-nfvo-lcm/test_ns
Change-Id: I9654f912d776ea2e173283850415e6835404a3c4 Issue-Id: VFC-444 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r--lcm/ns/tests/test_ns_create.py1
-rw-r--r--lcm/ns/tests/test_ns_instant.py3
-rw-r--r--lcm/ns/tests/test_ns_manual_scale.py7
3 files changed, 4 insertions, 7 deletions
diff --git a/lcm/ns/tests/test_ns_create.py b/lcm/ns/tests/test_ns_create.py
index 408d088e..3847764f 100644
--- a/lcm/ns/tests/test_ns_create.py
+++ b/lcm/ns/tests/test_ns_create.py
@@ -24,6 +24,7 @@ from lcm.pub.exceptions import NSLCMException
from lcm.pub.database.models import NSInstModel, NSDModel
from lcm.pub.utils import restcall
+
class TestNsInstantiate(TestCase):
def setUp(self):
self.client = Client()
diff --git a/lcm/ns/tests/test_ns_instant.py b/lcm/ns/tests/test_ns_instant.py
index 955284ce..10fa3a9f 100644
--- a/lcm/ns/tests/test_ns_instant.py
+++ b/lcm/ns/tests/test_ns_instant.py
@@ -11,14 +11,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-import mock
from rest_framework import status
from django.test import TestCase
from django.test import Client
from lcm.pub.database.models import NSInstModel
-from lcm.pub.utils import restcall
-from lcm.pub.utils import toscautil
class TestNsInstant(TestCase):
diff --git a/lcm/ns/tests/test_ns_manual_scale.py b/lcm/ns/tests/test_ns_manual_scale.py
index 6d2097df..ad7b2223 100644
--- a/lcm/ns/tests/test_ns_manual_scale.py
+++ b/lcm/ns/tests/test_ns_manual_scale.py
@@ -19,13 +19,13 @@ from rest_framework import status
from django.test import TestCase
from django.test import Client
from lcm.pub.database.models import NSDModel, NSInstModel
-from lcm.pub.utils.jobutil import JobUtil, JOB_MODEL_STATUS, JOB_TYPE
+from lcm.pub.utils.jobutil import JobUtil, JOB_TYPE
from lcm.ns.const import NS_INST_STATUS
from lcm.pub.utils import restcall
-from lcm.pub.utils import toscautil
from lcm.ns.ns_manual_scale import NSManualScaleService
from lcm.pub.exceptions import NSLCMException
+
class TestNsManualScale(TestCase):
def setUp(self):
self.nsd_id = str(uuid.uuid4())
@@ -41,7 +41,6 @@ class TestNsManualScale(TestCase):
def tearDown(self):
NSInstModel.objects.filter().delete()
-
"""
@mock.patch.object(restcall, 'call_req')
@mock.patch.object(toscautil, 'convert_nsd_model')
@@ -76,7 +75,7 @@ class TestNsManualScale(TestCase):
'nsdid': self.nsd_id,
'nsname': 'ns',
'description': 'description'}
- response = self.client.post("/api/nslcm/v1/ns/%s/scale"%self.nsd_id, data=data)
+ response = self.client.post("/api/nslcm/v1/ns/%s/scale" % self.nsd_id, data=data)
self.failUnlessEqual(status.HTTP_202_ACCEPTED, response.status_code)
@mock.patch.object(restcall, 'call_req')