Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ansible/rebuild_module.digest
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0f98b612b97ffcc98304fc9581a8727a -
45e5927b24842946eaf6fab1a145810f -

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/openshift/apiobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def __init__(self, dict_to_model=None, string_to_model=None, context=None):
# make sure to force a namespace.

self.context = copy.copy(context if context else cur_context())
self.context.project_name = self.namespace(None)
self.context.project_name = self.namespace(self.context.project_name)

def as_dict(self):
"""
Expand Down
7 changes: 7 additions & 0 deletions packages/openshift/test_apiobject.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import unittest

from openshift import Context
from .apiobject import APIObject


Expand All @@ -12,6 +13,12 @@ def test_empty(self):
self.assertEqual(obj.as_json(), '{}')
self.assertIsNone(obj.context.project_name)

def test_context(self):
context = Context()
context.project_name = "my-project"
obj = APIObject(context=context)
self.assertEqual(obj.context.project_name, context.project_name)


if __name__ == '__main__':
unittest.main()