Ignore:
Timestamp:
25 Jan 2012, 12:52:43 (13 years ago)
Author:
uli
Message:

Be more accurate about imported date. We complain only, when a wrong
date is imported.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_batching.py

    r7508 r7509  
    1818"""Unit tests for applicants-related data importers.
    1919"""
     20import datetime
    2021import os
    2122import shutil
     
    256257        else:
    257258            shutil.rmtree(os.path.dirname(fin_file))
    258         self.assertEqual(num_warns,1)
    259         self.assertTrue(
    260             'date_of_birth: Invalid datetime data' in fail_contents)
    261         self.assertEqual(len(self.app['applicants']['dp2011'].keys()), 1)
     259        for applicant in self.app['applicants']['dp2011'].values():
     260            if applicant.date_of_birth == datetime.date(1990, 1, 2):
     261                self.fail(
     262                    'Wrong birthdate of imported applicant '
     263                    '(1990-01-02, should be: 1990-02-01)')
    262264        return
    263265
Note: See TracChangeset for help on using the changeset viewer.