def setUp(self):
     super(TestSetUpCCZFileForHosting, self).setUp()
     self.link = HostedCCZLink(username="******",
                               password="******",
                               identifier="link1234",
                               domain="test")
     self.hosted_ccz = HostedCCZ(link=self.link,
                                 app_id="dummy",
                                 version=12,
                                 profile_id="123456")
Пример #2
0
 def setUp(self):
     super(TestHostedCCZ, self).setUp()
     self.link = HostedCCZLink.objects.create(username="******",
                                              password="******",
                                              identifier="link123",
                                              domain="test")
     self.hosted_ccz = HostedCCZ(link=self.link,
                                 app_id="dummy",
                                 version=12,
                                 profile_id="12345")
 def setUpClass(cls):
     super(TestHostedCCZSerializer, cls).setUpClass()
     cls.link = HostedCCZLink.objects.create(username="******",
                                             password="******",
                                             identifier="link123",
                                             domain="test")
     cls.hosted_ccz = HostedCCZ(link=cls.link,
                                app_id="dummy",
                                version=12,
                                profile_id="12345",
                                file_name="my file")
Пример #4
0
 def save(self):
     try:
         HostedCCZ(
             link_id=self.cleaned_data['link_id'],
             app_id=self.cleaned_data['app_id'],
             version=self.cleaned_data['version'],
             profile_id=self.cleaned_data['profile_id'],
             file_name=self.cleaned_data['file_name'],
             note=self.cleaned_data['note'],
         ).save(email=self.email)
     except ValidationError as e:
         return False, ','.join(e.messages)
     return True, None