test_calc_imputations_3
This commit is contained in:
parent
32861d10af
commit
390f563ac0
2 changed files with 28 additions and 6 deletions
|
|
@ -372,16 +372,29 @@ class TeacherTests(TestCase):
|
|||
result = self.teacher.calc_imputations()
|
||||
self.assertEqual(result[1]['ASSC'], 9)
|
||||
self.assertEqual(result[1]['EDEpe'], 5)
|
||||
|
||||
# Test with only EDE data
|
||||
t2 = Teacher.objects.create(
|
||||
first_name='Isidore', last_name='Gluck', birth_date='1986-01-01'
|
||||
)
|
||||
Course.objects.create(
|
||||
teacher=t2, period=13, subject='#ASE Colloque', imputation='ASSCFE',
|
||||
)
|
||||
Course.objects.create(
|
||||
teacher=t2, period=5, subject='Cours EDE', imputation='EDE',
|
||||
)
|
||||
Course.objects.create(
|
||||
teacher=t2, period=17, subject='Sém. enfance 2', imputation='ASE',
|
||||
)
|
||||
|
||||
result = t2.calc_imputations()
|
||||
self.assertEqual(result[1]['ASE'], 19)
|
||||
self.assertEqual(result[1]['ASSC'], 16) # rounding correction (first col > 0)
|
||||
self.assertEqual(result[1]['EDEpe'], 2)
|
||||
self.assertEqual(result[1]['EDEps'], 3)
|
||||
self.assertEqual(result[0]['tot_paye'], result[0]['tot_trav'])
|
||||
self.assertEqual(result[0]['tot_paye'], 40)
|
||||
self.assertEqual(result[0]['report'], 0)
|
||||
|
||||
def test_export_imputations(self):
|
||||
self.client.login(username='me', password='mepassword')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue