def test_default_path(self): """ Infer the user's home directory (either in /Users/.. or /home/..) and check if the default path produces the corrrect output. """ possible_paths = test_utils.get_possible_config_locations() actual = gnippy_config.get_default_config_file_path() self.assertTrue(actual in possible_paths)
def test_no_args(self): """ Check if a ~/.gnippy file is present and run a no-arg test. """ possible_paths = test_utils.get_possible_config_locations() for config_path in possible_paths: if os.path.isfile(config_path): client = PowerTrackClient(_dummy_callback) self.assertIsNotNone(client.auth) self.assertIsNotNone(client.url) self.assertTrue("http" in client.url and "://" in client.url)