Merge pull request #1560 from ogayot/fix-unittest-schroot

Fix unittest using timedatectl failing in chroot
This commit is contained in:
Olivier Gayot 2023-02-14 10:43:41 +01:00 committed by GitHub
commit 538a802118
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -46,7 +46,10 @@ class TestTimeZoneController(SubiTestCase):
@mock.patch('subiquity.server.controllers.timezone.timedatectl_settz')
@mock.patch('subiquity.server.controllers.timezone.timedatectl_gettz')
async def test_good_tzs(self, tdc_gettz, tdc_settz):
@mock.patch('subiquity.server.controllers.timezone.generate_possible_tzs')
async def test_good_tzs(self, generate_possible_tzs, tdc_gettz, tdc_settz):
generate_possible_tzs.return_value = \
['', 'geoip', 'Pacific/Auckland', 'America/Denver']
tdc_gettz.return_value = tz_utc
goods = [
# val - autoinstall value