diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2008-04-03 14:39:50 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2008-04-03 14:39:50 -0400 |
commit | ae3014f2498a8566acbe4439eb0a6916456ce27f (patch) | |
tree | 9315bc2bf4ccddfa3ec21dc2c07271f00daa5de6 /tests | |
parent | 3c08531c4e913268b94618b9939a44161d2dc556 (diff) | |
download | third_party-cobbler-ae3014f2498a8566acbe4439eb0a6916456ce27f.tar.gz third_party-cobbler-ae3014f2498a8566acbe4439eb0a6916456ce27f.tar.xz third_party-cobbler-ae3014f2498a8566acbe4439eb0a6916456ce27f.zip |
Fix default ownership on cobbler owned objects to come from the settings
file (who's default is "admin" through the CLI) ... the webui will prepopulate
the field with the name of the logged in user.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tests.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/tests.py b/tests/tests.py index 2c055ba..8a86bab 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -73,7 +73,7 @@ class BootTest(unittest.TestCase): self.assertTrue(distro.set_initrd(self.fk_initrd)) self.assertTrue(self.api.add_distro(distro)) self.assertTrue(self.api.find_distro(name="testdistro0")) - + profile = self.api.new_profile() self.assertTrue(profile.set_name("testprofile0")) self.assertTrue(profile.set_distro("testdistro0")) @@ -109,10 +109,20 @@ class Ownership(BootTest): fd.write("") fd.close() + # find things we are going to test with distro = self.api.find_distro(name="testdistro0") profile = self.api.find_profile(name="testprofile0") system = self.api.find_system(name="drwily.rdu.redhat.com") repo = self.api.find_repo(name="test_repo") + + # as we didn't specify an owner for objects, the default + # ownership should be as specified in settings + default_owner = self.api.settings().default_ownership + for obj in [ distro, profile, system, repo ]: + self.assertTrue(obj is not None) + self.assertEquals(obj.owners, default_owner, "default owner for %s" % obj) + + # verify we can test things self.assertTrue(distro.set_owners(["superlab","basement1"])) self.assertTrue(profile.set_owners(["superlab","basement1"])) self.assertTrue(profile.set_kickstart("/tmp/test_cobbler_kickstart")) |