def test_get_filenames_url(self):
     tempdir = mkdtemp()
     h_file, j_file = cloud_weather_report.get_filenames(
         'http://example.com/~git')
     rmtree(tempdir)
     self.assertTrue(h_file.startswith(
         'results/http___example_com__git') and h_file.endswith('.html'))
     self.assertTrue(j_file.startswith(
         'results/http___example_com__git') and j_file.endswith('.json'))
     h_file, j_file = cloud_weather_report.get_filenames(
         'cs:~user/mysql-benchmark')
     self.assertTrue(j_file.startswith(
         'results/cs__user_mysql_benchmark') and j_file.endswith('.json'))
 def test_get_filenames(self):
     tempdir = mkdtemp()
     h_file, j_file = cloud_weather_report.get_filenames('git')
     rmtree(tempdir)
     self.assertTrue(h_file.startswith('results/git-') and
                     h_file.endswith('.html'))
     self.assertTrue(j_file.startswith('results/git-') and
                     j_file.endswith('.json'))