Merge branch 'tobi-wan-kenobi:main' into main

This commit is contained in:
Dhananjay Tanpure 2022-03-07 08:58:13 +05:30 committed by GitHub
commit 3de6f9f4b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 468 additions and 13 deletions

View file

@ -26,6 +26,15 @@ class PublicIPTest(TestCase):
assert widget(module).full_text() == '5.12.220.2'
@mock.patch('util.location.public_ip')
def test_public_ip(self, public_ip_mock):
public_ip_mock.return_value = None
module = build_module()
module.update()
assert widget(module).full_text() == 'n/a'
@mock.patch('util.location.public_ip')
def test_public_ip_with_exception(self, public_ip_mock):
public_ip_mock.side_effect = Exception