예제 #1
0
    def test_delete_project_when_empty(self, gigantum_project_fixture):
        gigaleaf = Gigaleaf()

        assert Path(gigaleaf.overleaf.overleaf_config_file).is_file() is True

        gigaleaf.delete()

        assert Path(Gigantum.get_overleaf_root_directory()).is_dir() is False
        assert Path(gigaleaf.overleaf.overleaf_config_file).is_file() is False
예제 #2
0
    def test_delete_project_link(self, gigantum_project_fixture):
        gigaleaf = Gigaleaf()

        assert Path(Gigantum.get_overleaf_root_directory(), 'project',
                    'gigantum', 'metadata', 'fig1_png.json').is_file() is False

        gigaleaf.link_image('../output/fig1.png')

        assert Path(Gigantum.get_overleaf_root_directory(), 'project',
                    'gigantum', 'metadata', 'fig1_png.json').is_file() is True

        gigaleaf.sync()

        assert Path(Gigantum.get_overleaf_root_directory(), 'project',
                    'gigantum', 'data', 'fig1.png').is_file() is True

        gigaleaf.delete()

        assert Path(Gigantum.get_overleaf_root_directory()).is_dir() is False
        assert Path(gigaleaf.overleaf.overleaf_config_file).is_file() is False