Example #1
0
def create_testuserases():
    exbert = get_testuser_exbert()
    aps = AttachmentPoint.objects.all()
    _create_user_as(exbert, aps[0], UserAS.VM, True)
    _create_user_as(exbert, aps[1], UserAS.VM, False)
    _create_user_as(exbert, aps[2], UserAS.PKG, False)
    _create_user_as(exbert, aps[3], UserAS.PKG, True)
    _create_user_as(exbert, aps[0], UserAS.SRC, False)
Example #2
0
 def test_user_as(self):
     for user_as in UserAS.objects.filter(
             owner=get_testuser_exbert()).iterator():
         archive = DictWriter()
         generate_user_as_config_tar(user_as, archive)
         self._check_archive('user_as_%i' % user_as.id, archive)
Example #3
0
 def test_user_as_vm_host(self, user_as_id):
     user_as = UserAS.objects.filter(
         owner=get_testuser_exbert(),
         installation_type=UserAS.VM
     ).order_by('pk')[user_as_id]
     self._test_host(user_as.host)
Example #4
0
 def test_user_as(self, user_as_id):
     user_as = UserAS.objects.filter(owner=get_testuser_exbert()).order_by('pk')[user_as_id]
     archive = DictWriter()
     generate_user_as_config_tar(user_as, archive)
     self._check_archive('user_as_%i' % user_as.id, archive)