forked from adobe-apiplatform/user-sync.py
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request adobe-apiplatform#201 from mbonish/testing_AdobeGroup
Testing common_engine
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from user_sync.engine.common import AdobeGroup | ||
|
||
class TestAdobeGroup(): | ||
|
||
def test_get_qualified_name(self): | ||
#standard test | ||
self.umapi_name = None | ||
self.group_name = 'group_name' | ||
result = AdobeGroup.get_qualified_name(self) | ||
assert result == ('group_name') | ||
|
||
#umapi_name variation test | ||
GROUP_NAME_DELIMITER = '::' | ||
PRIMARY_TARGET_NAME ='not_umapi_name' | ||
self.umapi_name = 'umapi_name' | ||
self.group_name = 'group_name' | ||
result = AdobeGroup.get_qualified_name(self) | ||
assert result == ("umapi_name::group_name") | ||
|
||
|
||
def test_parse(self): | ||
result = AdobeGroup._parse('qualified_name') | ||
assert result == ('qualified_name', None) | ||
|
||
def test_create(self): | ||
group = AdobeGroup.create('group_name') | ||
|
||
assert isinstance(group, AdobeGroup) | ||
assert group.get_group_name() == 'group_name' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
21412 |