def pytest_generate_tests(metafunc): if 'localfs_envs' in metafunc.fixturenames: from pootle_fs.state import FS_STATE env_names = [e for e in FS_STATE.keys() if e not in ["both_removed"]] metafunc.parametrize("localfs_env_names", env_names) if "possible_action_keys" in metafunc.fixturenames: metafunc.parametrize("possible_action_keys", _possible_actions())
def test_fs_state_instance(settings, english): settings.POOTLE_FS_PATH = "/tmp/foo/" project = ProjectDBFactory(source_language=english) plugin = DummyPlugin(project) state = ProjectFSState(plugin) assert state.project == project assert state.states == FS_STATE.keys() assert (str(state) == ( "<ProjectFSState(<DummyPlugin(%s)>): Nothing to report>" % project.fullname))
def test_fs_state_instance(settings, english): settings.POOTLE_FS_WORKING_PATH = "/tmp/foo/" project = ProjectDBFactory(source_language=english) plugin = DummyPlugin(project) state = ProjectFSState(plugin) assert state.project == project assert state.states == FS_STATE.keys() assert ( str(state) == ("<ProjectFSState(<DummyPlugin(%s)>): Nothing to report>" % project.fullname))