Пример #1
0
 def test_deleteAllVM(self):
     userM = UserManagement("CygnusCloud", "cygnuscloud2012",
                            "WebServerDBTest", 1)
     userM.deleteAllVM(2)
     l1 = userM.getVMNames(2)
     l2 = []
     self.assertEquals(l1, l2, "Not All VM deleted")
Пример #2
0
 def test_groupVMs(self):
     userM = UserManagement("CygnusCloud","cygnuscloud2012","WebServerDBTest",2)
     l1 = userM.getVMNames(1)
     l2 = ["VMName1","VMName2"]
     self.assertEquals(l1, l2, "Not same VMS")
Пример #3
0
 def test_userGroups(self):
     userM = UserManagement("CygnusCloud","cygnuscloud2012","WebServerDBTest",2)
     l1 = userM.getUserGroupsIds()
     l2 = [1,2]
     self.assertEquals(l1, l2, "Not same groups")
Пример #4
0
 def test_userGroups(self):
     userM = UserManagement("CygnusCloud", "cygnuscloud2012",
                            "WebServerDBTest", 2)
     l1 = userM.getUserGroupsIds()
     l2 = [1, 2]
     self.assertEquals(l1, l2, "Not same groups")
Пример #5
0
 def test_groupIds(self):
     userM = UserManagement("CygnusCloud","cygnuscloud2012","WebServerDBTest",1)
     l1 = userM.getGroupId("VMName1")
     l2 = [1]
     self.assertEquals(l1, l2, "Not Same groups")     
Пример #6
0
 def test_createType(self):
     userM = UserManagement("CygnusCloud","cygnuscloud2012","WebServerDBTest",1)
     typeId = userM.createType("TypeTest")
     self.assertTrue(userM.isTypeExists(typeId), "type not created")
Пример #7
0
 def test_deleteVM(self):
     userM = UserManagement("CygnusCloud","cygnuscloud2012","WebServerDBTest",1)
     userM.deleteVM("VMName3",2)
     self.assertFalse(userM.isVMExists("VMName3"), "VM not deleted")
Пример #8
0
 def test_deleteUser(self):
     userM = UserManagement("CygnusCloud","cygnuscloud2012","WebServerDBTest",1)
     userM.deleteUser(7)
     self.assertFalse(userM.isUserExists(7), "User not deleted")
Пример #9
0
 def test_deleteVM(self):
     userM = UserManagement("CygnusCloud", "cygnuscloud2012",
                            "WebServerDBTest", 1)
     userM.deleteVM("VMName3", 2)
     self.assertFalse(userM.isVMExists("VMName3"), "VM not deleted")
Пример #10
0
 def test_deleteUser(self):
     userM = UserManagement("CygnusCloud", "cygnuscloud2012",
                            "WebServerDBTest", 1)
     userM.deleteUser(7)
     self.assertFalse(userM.isUserExists(7), "User not deleted")
Пример #11
0
 def test_createUser(self):
     userM = UserManagement("CygnusCloud", "cygnuscloud2012",
                            "WebServerDBTest", 1)
     userId = userM.createUser("UserTest", "testPass", 2)
     self.assertTrue(userM.isUserExists(str(userId)), "User not created")
Пример #12
0
 def test_groupTeachers(self):
     userM = UserManagement("CygnusCloud", "cygnuscloud2012",
                            "WebServerDBTest", 2)
     l1 = userM.getTeachers(1)
     l2 = ["Teacher1"]
     self.assertEquals(l1, l2, "Not same Teachers")
Пример #13
0
 def test_groupSubjects(self):
     userM = UserManagement("CygnusCloud", "cygnuscloud2012",
                            "WebServerDBTest", 2)
     l1 = userM.getSubjects(1)
     l2 = ("Subject1", 1, 2012, "a")
     self.assertEquals(l1, l2, "Not same Subjects")
Пример #14
0
 def test_groupVMs(self):
     userM = UserManagement("CygnusCloud", "cygnuscloud2012",
                            "WebServerDBTest", 2)
     l1 = userM.getVMNames(1)
     l2 = ["VMName1", "VMName2"]
     self.assertEquals(l1, l2, "Not same VMS")
Пример #15
0
 def test_groupSubjects(self):
     userM = UserManagement("CygnusCloud","cygnuscloud2012","WebServerDBTest",2)
     l1 = userM.getSubjects(1)
     l2 = ("Subject1",1,2012,"a")
     self.assertEquals(l1, l2, "Not same Subjects")   
Пример #16
0
 def test_createType(self):
     userM = UserManagement("CygnusCloud", "cygnuscloud2012",
                            "WebServerDBTest", 1)
     typeId = userM.createType("TypeTest")
     self.assertTrue(userM.isTypeExists(typeId), "type not created")
Пример #17
0
 def test_groupTeachers(self):
     userM = UserManagement("CygnusCloud","cygnuscloud2012","WebServerDBTest",2)
     l1 = userM.getTeachers(1)
     l2 = ["Teacher1"]
     self.assertEquals(l1, l2, "Not same Teachers") 
Пример #18
0
 def test_deleteType(self):
     userM = UserManagement("CygnusCloud", "cygnuscloud2012",
                            "WebServerDBTest", 1)
     userM.deleteType(4)
     self.assertFalse(userM.isTypeExists(4), "type not deleted")
Пример #19
0
 def test_createUser(self):
     userM = UserManagement("CygnusCloud","cygnuscloud2012","WebServerDBTest",1)
     userId = userM.createUser("UserTest","testPass",2)
     self.assertTrue(userM.isUserExists(str(userId)), "User not created")
Пример #20
0
 def test_groupIds(self):
     userM = UserManagement("CygnusCloud", "cygnuscloud2012",
                            "WebServerDBTest", 1)
     l1 = userM.getGroupId("VMName1")
     l2 = [1]
     self.assertEquals(l1, l2, "Not Same groups")
Пример #21
0
 def test_deleteAllVM(self):
     userM = UserManagement("CygnusCloud","cygnuscloud2012","WebServerDBTest",1)
     userM.deleteAllVM(2)
     l1 = userM.getVMNames(2)
     l2 = []
     self.assertEquals(l1, l2, "Not All VM deleted")
Пример #22
0
 def test_userIds(self):
     userM = UserManagement("CygnusCloud", "cygnuscloud2012",
                            "WebServerDBTest", 1)
     l1 = userM.getUsersId(1)
     l2 = [2, 3, 5]
     self.assertEquals(l1, l2, "Not Same users")
Пример #23
0
 def test_deleteType(self):
     userM = UserManagement("CygnusCloud","cygnuscloud2012","WebServerDBTest",1)
     userM.deleteType(4)
     self.assertFalse(userM.isTypeExists(4), "type not deleted") 
Пример #24
0
 def test_userTypes(self):
     userM = UserManagement("CygnusCloud","cygnuscloud2012","WebServerDBTest",2)
     l1 = userM.getTypeIds()
     l2 = [1,3]
     self.assertEquals(l1, l2, "Not same types")
Пример #25
0
 def test_userIds(self):
     userM = UserManagement("CygnusCloud","cygnuscloud2012","WebServerDBTest",1)
     l1 = userM.getUsersId(1)
     l2 = [2,3,5]
     self.assertEquals(l1, l2, "Not Same users")    
Пример #26
0
 def test_userTypes(self):
     userM = UserManagement("CygnusCloud", "cygnuscloud2012",
                            "WebServerDBTest", 2)
     l1 = userM.getTypeIds()
     l2 = [1, 3]
     self.assertEquals(l1, l2, "Not same types")