Added finding projects by id and name using an indexer.
This commit is contained in:
15
tests.py
15
tests.py
@@ -15,6 +15,21 @@ class Test01(unittest.TestCase):
|
||||
org = self.org
|
||||
projects = list(org.projects)
|
||||
self.assertGreater(len(projects), 0)
|
||||
def test_02(self):
|
||||
"""Getting a specific project by ID (object instantiation)"""
|
||||
project = Project(self.org, id="bafe0cf1-6c97-4088-864a-ea6dc02b2727")
|
||||
self.assertEqual(project.id, "bafe0cf1-6c97-4088-864a-ea6dc02b2727")
|
||||
self.assertEqual(project.name, "ADO Sandbox")
|
||||
def test_03(self):
|
||||
"""Getting a specific project by name using org indexing (object retrieval)"""
|
||||
project = self.org["ADO Sandbox"]
|
||||
self.assertEqual(project.id, "bafe0cf1-6c97-4088-864a-ea6dc02b2727")
|
||||
self.assertEqual(project.name, "ADO Sandbox")
|
||||
def test_04(self):
|
||||
"""Getting a specific project by ID using org indexing (object retrieval)"""
|
||||
project = self.org["bafe0cf1-6c97-4088-864a-ea6dc02b2727"]
|
||||
self.assertEqual(project.id, "bafe0cf1-6c97-4088-864a-ea6dc02b2727")
|
||||
self.assertEqual(project.name, "ADO Sandbox")
|
||||
|
||||
class Test02(unittest.TestCase):
|
||||
def setUp(self):
|
||||
|
||||
Reference in New Issue
Block a user