def test_read_token_from_file(self, _): mo = mock_open(read_data="test_token") with patch("batfish.client.open", mo, create=True): token = read_token_from_conf() self.assertEqual(token, "test_token")
def test_read_token_no_file(self, _): token = read_token_from_conf() self.assertEqual(token, None)