Merge branch 'tobi-wan-kenobi:main' into main
This commit is contained in:
commit
3de6f9f4b9
16 changed files with 468 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue