def test_save_load_delete_with_repos(self):
        """
        Tests saving, reloading, and then deleting the listing file.
        """

        # Test Save
        f = ProtectedRepoListingFile(TEST_FILE)
        f.add_protected_repo_path('foo', 'repo1')
        f.save()

        # Verify Save
        self.assertTrue(os.path.exists(TEST_FILE))

        # Test Load
        f = ProtectedRepoListingFile(TEST_FILE)
        f.load()

        # Verify Load
        self.assertEqual(1, len(f.listings))
        self.assertTrue('foo' in f.listings)
        self.assertEqual('repo1', f.listings['foo'])

        # Test Delete
        f.delete()

        # Verify Delete
        self.assertTrue(not os.path.exists(TEST_FILE))