removing date.today and replacing with timezone.now
This commit is contained in:
@@ -514,6 +514,12 @@ class DataPrepTests(TestCase):
|
||||
self.assertEqual(starttime,'19:55:13')
|
||||
self.assertEqual(startdate,'2021-06-15')
|
||||
|
||||
def test_calculate_age(self):
|
||||
today = timezone.now()
|
||||
born = today-datetime.timedelta(days=45+49*365.2425)
|
||||
age = dataprep.calculate_age(born,today=today)
|
||||
self.assertEqual(age,49)
|
||||
|
||||
@patch('rowers.dataprep.getsmallrowdata_db',side_effect=mocked_getsmallrowdata_uh)
|
||||
def test_goldmedalstandard(self,mocked_getsmallrowdata_uh):
|
||||
maxvalue, delta = dataprep.calculate_goldmedalstandard(self.r,self.wuh_otw)
|
||||
|
||||
Reference in New Issue
Block a user