def setUp(self): super(TestThreadList, self).setUp() self.addon = Webapp.objects.get(pk=337141) self.list_url = reverse('comm-thread-list') # Exclude extensions. extension = extension_factory() thread = CommunicationThread.objects.create( _extension=extension, _extension_version=extension.latest_version) CommunicationNote.objects.create(thread=thread, body='abc')
def setUp(self): self.extension = extension_factory() self.profile = UserProfile.objects.get(pk=999) t = CommunicationThread.objects.create( _extension=self.extension, _extension_version=self.extension.latest_version, read_permission_reviewer=True) self.token = CommunicationThreadToken.objects.create( thread=t, user=self.profile) self.token.update(uuid='5a0b8a83d501412589cc5d562334b46b') self.email_base64 = open(sample_email).read() self.grant_permission(self.profile, 'ContentTools:AddonReview')
def setUp(self): self.extension = extension_factory() self.profile = UserProfile.objects.get(pk=999) t = CommunicationThread.objects.create( _extension=self.extension, _extension_version=self.extension.latest_version, read_permission_reviewer=True) self.token = CommunicationThreadToken.objects.create(thread=t, user=self.profile) self.token.update(uuid='5a0b8a83d501412589cc5d562334b46b') self.email_base64 = open(sample_email).read() self.grant_permission(self.profile, 'ContentTools:AddonReview')
def setUp(self): # Keep self.addon name to work with _thread_factory(). super(TestNoteExtension, self).setUp() self.addon = extension_factory() self.version = self.addon.latest_version self.thread = self._thread_factory( perms=['developer'], version=self.addon.latest_version) self.thread_url = reverse( 'comm-thread-detail', kwargs={'pk': self.thread.id}) self.list_url = reverse( 'comm-note-list', kwargs={'thread_id': self.thread.id}) self.profile = UserProfile.objects.get(pk=2519) self.profile.extension_set.add(self.addon)
def setUp(self): # Keep self.addon name to work with _thread_factory(). super(TestNoteExtension, self).setUp() self.addon = extension_factory() self.version = self.addon.latest_version self.thread = self._thread_factory(perms=['developer'], version=self.addon.latest_version) self.thread_url = reverse('comm-thread-detail', kwargs={'pk': self.thread.id}) self.list_url = reverse('comm-note-list', kwargs={'thread_id': self.thread.id}) self.profile = UserProfile.objects.get(pk=2519) self.profile.extension_set.add(self.addon)
def setUp(self): super(TestNoteListView, self).setUp() self.extension = extension_factory(name='yip') self.extension_author = user_factory(email='*****@*****.**') self.extension_thread = self.extension.threads.create( _extension_version=self.extension.latest_version) self.extension_note = self.extension_thread.notes.create( author=self.extension_author, body='extension note') self.app = app_factory(name='yip', app_slug='yip') self.app_author = user_factory(email='*****@*****.**') self.app_thread = self.app.threads.create( _version=self.app.current_version) self.app_note = self.app_thread.notes.create( author=self.app_author, body='webapp note') self.url = reverse('api-v2:comm-note-list-all')
def setUp(self): super(TestNoteListView, self).setUp() self.extension = extension_factory(name='yip') self.extension_author = user_factory(email='*****@*****.**') self.extension_thread = self.extension.threads.create( _extension_version=self.extension.latest_version) self.extension_note = self.extension_thread.notes.create( author=self.extension_author, body='extension note') self.app = app_factory(name='yip', app_slug='yip') self.app_author = user_factory(email='*****@*****.**') self.app_thread = self.app.threads.create( _version=self.app.current_version) self.app_note = self.app_thread.notes.create(author=self.app_author, body='webapp note') self.url = reverse('api-v2:comm-note-list-all')
def setUp(self): super(TestCommExtensionListView, self).setUp() # Keep the self.addon name so it can work with CommTestMixin. self.addon = extension_factory() self.profile = UserProfile.objects.get(id=2519) self.profile.extension_set.add(self.addon)
def setUp(self): self.extension = extension_factory() self.user = user_factory() self.thread = self.extension.threads.create() self.note = self.thread.notes.create()
def setUp(self): self.developer = user_factory() self.reviewer = user_factory() self.extension = extension_factory() self.developer.extension_set.add(self.extension)
def setUp(self): self.user = user_factory() self.grant_permission(self.user, '*:*') self.extension = extension_factory()