[CORD-1502] [CORD-1516] Authenticating the user that is sending the
request and caching it's orm classes
Change-Id: I4754c1395d085ed0cf313c7fffebbd2d0b8c7fd4
diff --git a/test/test_tosca_parser_e2e.py b/test/test_tosca_parser_e2e.py
index 5438c76..aceec43 100644
--- a/test/test_tosca_parser_e2e.py
+++ b/test/test_tosca_parser_e2e.py
@@ -20,7 +20,11 @@
class FakeUser:
objects = FakeObj
-mock_resources = {
+USERNAME = "username"
+PASSWORD = "pass"
+
+mock_resources = {}
+mock_resources["%s~%s" % (USERNAME, PASSWORD)] = {
'XOSGuiExtension': FakeGuiExt,
'Site': FakeSite,
'User': FakeUser
@@ -54,7 +58,7 @@
files: /spa/extensions/test/vendor.js, /spa/extensions/test/app.js
"""
- parser = TOSCA_Parser(recipe)
+ parser = TOSCA_Parser(recipe, USERNAME, PASSWORD)
parser.execute()
@@ -114,7 +118,7 @@
relationship: tosca.relationships.BelongsToOne
"""
- parser = TOSCA_Parser(recipe)
+ parser = TOSCA_Parser(recipe, USERNAME, PASSWORD)
parser.execute()
@@ -158,7 +162,7 @@
must-exist: True
"""
- parser = TOSCA_Parser(recipe)
+ parser = TOSCA_Parser(recipe, USERNAME, PASSWORD)
with self.assertRaises(Exception) as e:
parser.execute()