summaryrefslogtreecommitdiff
path: root/community/python-faker/remove-century-tests.patch
blob: 57cddebfe87abafacf735421d195808d279365a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- faker-0.8.4/tests/providers/test_date_time.py	2017-09-22 21:52:06.000000000 +0200
+++ test_date_time.py	2017-09-25 11:14:26.013321696 +0200
@@ -203,9 +203,6 @@
         return int(time.mktime(value.timetuple()))
 
     def test_date_time_this_period(self):
-        # test century
-        self.assertTrue(self._datetime_to_time(self.factory.date_time_this_century(after_now=False)) <= self._datetime_to_time(datetime.now()))
-        self.assertTrue(self._datetime_to_time(self.factory.date_time_this_century(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.now()))
         # test decade
         self.assertTrue(self._datetime_to_time(self.factory.date_time_this_decade(after_now=False)) <= self._datetime_to_time(datetime.now()))
         self.assertTrue(self._datetime_to_time(self.factory.date_time_this_decade(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.now()))
@@ -231,17 +228,12 @@
     def test_date_time_this_period_with_tzinfo(self):
         # ensure all methods provide timezone aware datetimes
         with self.assertRaises(TypeError):
-            self.factory.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.now()
-        with self.assertRaises(TypeError):
             self.factory.date_time_this_decade(after_now=False, tzinfo=utc) <= datetime.now()
         with self.assertRaises(TypeError):
             self.factory.date_time_this_year(after_now=False, tzinfo=utc) <= datetime.now()
         with self.assertRaises(TypeError):
             self.factory.date_time_this_month(after_now=False, tzinfo=utc) <= datetime.now()
 
-        # test century
-        self.assertTrue(self.factory.date_time_this_century(after_now=False, tzinfo=utc) <= datetime.now(utc))
-        self.assertTrue(self.factory.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.now(utc))
         # test decade
         self.assertTrue(self.factory.date_time_this_decade(after_now=False, tzinfo=utc) <= datetime.now(utc))
         self.assertTrue(self.factory.date_time_this_decade(before_now=False, after_now=True, tzinfo=utc) >= datetime.now(utc))
@@ -268,7 +260,6 @@
     def test_date_this_period(self):
         # test century
         self.assertTrue(self.factory.date_this_century(after_today=False) <= date.today())
-        self.assertTrue(self.factory.date_this_century(before_today=False, after_today=True) >= date.today())
         # test decade
         self.assertTrue(self.factory.date_this_decade(after_today=False) <= date.today())
         self.assertTrue(self.factory.date_this_decade(before_today=False, after_today=True) >= date.today())