Rename test_models of unit_python 51/54251/4
authorReemMahmoud <rfawzy.ext@orange.com>
Wed, 21 Mar 2018 10:49:05 +0000 (12:49 +0200)
committerThomas Duval <thomas.duval@orange.com>
Tue, 3 Apr 2018 14:14:32 +0000 (16:14 +0200)
Add licences in some files.

Change-Id: I7c473efcdb228cc030501328d93b5a6265917591
Signed-off-by: ReemMahmoud <rfawzy.ext@orange.com>
moon_manager/tests/unit_python/api/import_export_utilities.py
moon_manager/tests/unit_python/api/test_import.py
moon_manager/tests/unit_python/api/test_policies.py
moon_manager/tests/unit_python/api/test_unit_models.py [moved from moon_manager/tests/unit_python/api/test_models.py with 87% similarity]

index 98586d0..3c921e2 100644 (file)
@@ -4,7 +4,7 @@
 # or at 'http://www.apache.org/licenses/LICENSE-2.0'.
 
 import api.utilities as utilities
-import api.test_models as test_models
+import api.test_unit_models as test_models
 import api.test_policies as test_policies
 import api.test_perimeter as test_perimeter
 import api.meta_data_test as test_categories
index 4e970a0..3c45f8a 100644 (file)
@@ -4,7 +4,7 @@
 # or at 'http://www.apache.org/licenses/LICENSE-2.0'.
 
 import api.utilities as utilities
-import api.test_models as test_models
+import api.test_unit_models as test_models
 import api.test_policies as test_policies
 import api.test_perimeter as test_perimeter
 import api.meta_data_test as test_categories
index 4d4e387..40be35e 100644 (file)
@@ -1,5 +1,11 @@
+# Copyright 2018 Open Platform for NFV Project, Inc. and its contributors
+# This software is distributed under the terms and conditions of the 'Apache-2.0'
+# license which can be found in the file 'LICENSE' in this package distribution
+# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
+
 import json
 import api.utilities as utilities
+from uuid import uuid4
 
 
 def get_policies(client):
@@ -45,13 +51,14 @@ def test_get_policies():
 
 def test_add_policies():
     client = utilities.register_client()
-    req, policies = add_policies(client, "testuser")
+    policy_name = "testuser" + uuid4().hex
+    req, policies = add_policies(client, policy_name)
     assert req.status_code == 200
     assert isinstance(policies, dict)
     value = list(policies["policies"].values())[0]
     assert "policies" in policies
-    assert value['name'] == "testuser"
-    assert value["description"] == "description of {}".format("testuser")
+    assert value['name'] == policy_name
+    assert value["description"] == "description of {}".format(policy_name)
     assert value["model_id"] == "modelId"
     assert value["genre"] == "genre"
 
@@ -1,3 +1,8 @@
+# Copyright 2018 Open Platform for NFV Project, Inc. and its contributors
+# This software is distributed under the terms and conditions of the 'Apache-2.0'
+# license which can be found in the file 'LICENSE' in this package distribution
+# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
+
 import json
 import api.utilities as utilities