def test_setup_locale_with_first_weekday(): first_weekday = calendar.firstweekday() setup_locale("uk_UA.UTF-8", 1) assert calendar.firstweekday() == 1 setup_locale("en_US.UTF-8", first_weekday)
def test_setup_locale_with_first_weekday(self): first_weekday = calendar.firstweekday() setup_locale('uk_UA.UTF-8', 1) self.assertEqual(calendar.firstweekday(), 1) setup_locale('en_US.UTF-8', first_weekday)
def test_setup_locale(): monday = calendar.day_abbr[0] first_weekday = calendar.firstweekday() setup_locale("uk_UA.UTF-8") assert calendar.day_abbr[0] != monday assert calendar.firstweekday() == first_weekday
def test_setup_locale(self): monday = calendar.day_abbr[0] first_weekday = calendar.firstweekday() setup_locale('uk_UA.UTF-8') self.assertNotEqual(calendar.day_abbr[0], monday) self.assertEqual(calendar.firstweekday(), first_weekday)
def setUp(self): setup_locale('en_US.UTF-8') setup_timezone('UTC')