示例#1
0
def test_timerecord_update(perm_check):
    time_record = TimeRecordFactory()
    url = reverse(
        'invoice.time.update',
        kwargs={'pk': time_record.pk}
    )
    perm_check.staff(url)
示例#2
0
def test_invoice_create_time(perm_check):
    InvoiceSettingsFactory()
    VatSettingsFactory()
    contact = ContactFactory()
    InvoiceContactFactory(contact=contact)
    url = reverse('invoice.create.time', kwargs={'pk': contact.pk})
    perm_check.staff(url)
示例#3
0
def test_contact_detail(perm_check):
    UserContactFactory(user=get_user_web())
    user_contact = UserContactFactory()
    InvoiceContactFactory(contact=user_contact.contact)
    UserContactFactory(contact=user_contact.contact)
    url = reverse('contact.detail', args=[user_contact.contact.pk])
    perm_check.staff(url)
示例#4
0
def test_ticket_timerecord_list(perm_check):
    ticket = TicketFactory()
    url = reverse(
        'invoice.time.ticket.list',
        kwargs={'pk': ticket.pk}
    )
    perm_check.staff(url)
示例#5
0
def test_ticket_create(perm_check):
    contact = ContactFactory()
    url = reverse(
        'crm.ticket.create',
        kwargs={'pk': contact.pk}
    )
    perm_check.staff(url)
示例#6
0
def test_invoice_contact_update(perm_check):
    contact = ContactFactory()
    invoice_contact = InvoiceContactFactory(contact=contact)
    url = reverse(
        'invoice.contact.update',
        kwargs={'pk': invoice_contact.pk}
    )
    perm_check.staff(url)
示例#7
0
def test_invoice_download(perm_check):
    InvoiceSettingsFactory()
    VatSettingsFactory()
    contact = ContactFactory()
    InvoiceContactFactory(contact=contact)
    ticket = TicketFactory(contact=contact)
    TimeRecordFactory(ticket=ticket, date_started=date(2013, 12, 1))
    invoice = InvoiceCreate().create(
        UserFactory(),
        contact,
        date(2013, 12, 31)
    )
    InvoicePrint().create_pdf(invoice, header_image=None)
    url = reverse('invoice.download', kwargs={'pk': invoice.pk})
    perm_check.staff(url)
示例#8
0
def test_wizard_image_option(perm_check):
    content = TitleFactory()
    url = url_image_single(content, 'block.wizard.image.option')
    perm_check.staff(url)
示例#9
0
def test_wizard_link_option(perm_check):
    content = TitleFactory()
    url = url_link_single(content, 'block.wizard.link.option')
    perm_check.staff(url)
示例#10
0
def test_wizard_urls(perm_check):
    urls = TitleFactory().wizard_urls
    url = next(x['url'] for x in urls if 'Link' in x['caption'])
    perm_check.staff(url)
def test_ticket_create(perm_check):
    contact = ContactFactory()
    url = reverse('crm.ticket.create', kwargs={'pk': contact.pk})
    perm_check.staff(url)
def test_ticket_update(perm_check):
    ticket = TicketFactory()
    url = reverse('crm.ticket.update', kwargs={'pk': ticket.pk})
    perm_check.staff(url)
示例#13
0
def test_dash(perm_check):
    url = reverse('project.dash')
    perm_check.staff(url)
def test_note_create(perm_check):
    ticket = TicketFactory()
    url = reverse('crm.note.create', kwargs={'pk': ticket.pk})
    perm_check.staff(url)
示例#15
0
def test_invoice_update(perm_check):
    invoice = InvoiceFactory()
    url = reverse('invoice.update', kwargs={'pk': invoice.pk})
    perm_check.staff(url)
示例#16
0
def test_user_timerecord_list(perm_check):
    url = reverse('invoice.time.user.list')
    perm_check.staff(url)
示例#17
0
def test_timerecord_summary_user(perm_check):
    user = UserFactory()
    url = reverse('invoice.time.summary.user', args=[user.pk])
    perm_check.staff(url)
示例#18
0
def test_ticket_list_month(perm_check):
    url = reverse('invoice.ticket.list.month', args=[2000, 3])
    perm_check.staff(url)
示例#19
0
def test_timerecord_summary(perm_check):
    url = reverse('invoice.time.summary')
    perm_check.staff(url)
示例#20
0
def test_quick_time_record_update(perm_check):
    obj = QuickTimeRecordFactory()
    perm_check.staff(reverse('invoice.quick.time.record.update', args=[obj.pk]))
示例#21
0
def test_quick_time_record_create(perm_check):
    perm_check.staff(reverse('invoice.quick.time.record.create'))
示例#22
0
def test_wizard_image_remove(perm_check):
    content = TitleFactory(picture=ImageFactory())
    url = url_image_single(content, 'block.wizard.image.remove')
    perm_check.staff(url)
示例#23
0
def test_invoice_create_pdf(perm_check):
    invoice = InvoiceFactory()
    url = reverse('invoice.create.pdf', kwargs={'pk': invoice.pk})
    perm_check.staff(url)
示例#24
0
def test_contact_detail(perm_check):
    UserContactFactory(user=get_user_web())
    user_contact = UserContactFactory()
    url = reverse("contact.detail", args=[user_contact.contact.pk])
    perm_check.staff(url)
示例#25
0
def test_contact_time_record_list(perm_check):
    contact = ContactFactory()
    url = reverse('invoice.time.contact.list', kwargs={'pk': contact.pk})
    perm_check.staff(url)
示例#26
0
def test_quick_time_record(perm_check):
    perm_check.staff(reverse('invoice.quick.time.record.list'))
示例#27
0
def test_invoice_contact_create(perm_check):
    contact = ContactFactory()
    url = reverse('invoice.contact.create', kwargs={'pk': contact.pk})
    perm_check.staff(url)
def test_note_update(perm_check):
    note = NoteFactory()
    url = reverse('crm.note.update', kwargs={'pk': note.pk})
    perm_check.staff(url)
示例#29
0
def test_invoice_detail(perm_check):
    invoice = InvoiceFactory()
    url = reverse('invoice.detail', kwargs={'pk': invoice.pk})
    perm_check.staff(url)
def test_ticket_detail(perm_check):
    ticket = TicketFactory()
    url = reverse('crm.ticket.detail', kwargs={'pk': ticket.pk})
    perm_check.staff(url)
def test_ticket_home(perm_check):
    TicketFactory()
    url = reverse('crm.ticket.home')
    perm_check.staff(url)
示例#32
0
def test_wizard_image_upload(perm_check):
    content = TitleFactory()
    url = url_image_single(content, 'block.wizard.image.upload')
    perm_check.staff(url)
示例#33
0
def test_invoice_list(perm_check):
    url = reverse('invoice.list')
    perm_check.staff(url)
示例#34
0
def test_wizard_link_upload(perm_check):
    content = TitleFactory()
    url = url_link_single(content, 'block.wizard.link.upload')
    perm_check.staff(url)
def test_crm_contact_update(perm_check):
    contact = ContactFactory()
    crm_contact = CrmContactFactory(contact=contact)
    url = reverse('crm.contact.update', kwargs={'pk': crm_contact.pk})
    perm_check.staff(url)
示例#36
0
def test_wizard_image_choose_category(perm_check):
    category = ImageCategoryFactory()
    content = TitleFactory()
    url = url_image_single(content, 'block.wizard.image.choose', category=category)
    perm_check.staff(url)
示例#37
0
def test_note_update(perm_check):
    note = NoteFactory()
    url = reverse('crm.note.update', kwargs={'pk': note.pk})
    perm_check.staff(url)
示例#38
0
def test_wizard_image_select(perm_check):
    content = TitleFactory()
    url = url_image_single(content, 'block.wizard.image.order')
    perm_check.staff(url)
示例#39
0
def test_ticket_detail(perm_check):
    ticket = TicketFactory()
    url = reverse('crm.ticket.detail', kwargs={'pk': ticket.pk})
    perm_check.staff(url)
示例#40
0
def test_wizard_image_select(perm_check):
    content = TitleFactory()
    url = url_image_multi(content, 'block.wizard.image.select')
    perm_check.staff(url)
示例#41
0
def test_list(perm_check):
    EnquiryFactory()
    EnquiryFactory()
    url = reverse('enquiry.list')
    perm_check.staff(url)
示例#42
0
def test_search(perm_check):
    url = reverse("project.search")
    perm_check.staff(url)
示例#43
0
def test_ticket_list(perm_check):
    url = reverse('crm.ticket.list')
    perm_check.staff(url)
示例#44
0
def test_settings(perm_check):
    url = reverse('project.settings')
    perm_check.staff(url)
示例#45
0
def test_invoice_user_update(perm_check):
    url = reverse('invoice.user.update')
    perm_check.staff(url)
示例#46
0
def test_note_create(perm_check):
    ticket = TicketFactory()
    url = reverse('crm.note.create', kwargs={'pk': ticket.pk})
    perm_check.staff(url)
示例#47
0
def test_image_category(perm_check):
    perm_check.staff(reverse('block.image.category.list'))
示例#48
0
def test_image_category_create(perm_check):
    perm_check.staff(reverse('block.image.category.create'))
示例#49
0
def test_image_category_update(perm_check):
    obj = ImageCategoryFactory()
    perm_check.staff(reverse('block.image.category.update', args=[obj.pk]))
示例#50
0
def test_ticket_update(perm_check):
    ticket = TicketFactory()
    url = reverse('crm.ticket.update', kwargs={'pk': ticket.pk})
    perm_check.staff(url)
示例#51
0
def test_link_category(perm_check):
    perm_check.staff(reverse('block.link.category.list'))
def test_contact_detail(perm_check):
    UserContactFactory(user=get_user_web())
    contact = ContactFactory()
    crm_contact = CrmContactFactory(contact=contact)
    url = reverse('contact.detail', args=[contact.pk])
    perm_check.staff(url)
示例#53
0
def test_project_ticket_priority_list(perm_check):
    url = reverse('crm.project.ticket.priority.list')
    perm_check.staff(url)