Beispiel #1
0
 def test_get_home_page(self):
     resp = self.client.get(reverse('invoicing:home'))
     self.assertEqual(resp.status_code, 302)
     #after configuration
     settings = SalesConfig.objects.first()
     settings.is_configured = True
     settings.save()
     resp = self.client.get(reverse('invoicing:home'))
     self.assertEqual(resp.status_code, 200)
     settings.is_configured = False
     settings.save()
Beispiel #2
0
    def test_payslip_create_verified(self):
        settings = EmployeesSettings.objects.first()
        self.employee.user = self.user
        self.employee.save()
        settings.payroll_officer = self.officer
        settings.save()

        self.slip.status = 'verified'
        self.slip.save()
        self.slip.create_entry()
        self.assertIsInstance(self.slip.entry, JournalEntry)