Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/mercurial/tests/common.py
Show All 40 Lines | class BaseHgLoaderMemoryStorage: | ||||
Mixin behavior changed to: | Mixin behavior changed to: | ||||
- use an in-memory storage | - use an in-memory storage | ||||
- not use the default configuration loading mechanism | - not use the default configuration loading mechanism | ||||
At the end of the tests, you can make sure you have the rights | At the end of the tests, you can make sure you have the rights | ||||
objects. | objects. | ||||
""" | """ | ||||
def __init__(self): | def __init__(self, *args, **kwargs): | ||||
super().__init__() | super().__init__(*args, **kwargs) | ||||
self.origin_id = 1 | self.origin_id = 1 | ||||
self.visit = 1 | self.visit = 1 | ||||
def parse_config_file(self, *args, **kwargs): | def parse_config_file(self, *args, **kwargs): | ||||
return _LOADER_TEST_CONFIG | return _LOADER_TEST_CONFIG | ||||
class HgLoaderMemoryStorage(BaseHgLoaderMemoryStorage, HgBundle20Loader): | class HgLoaderMemoryStorage(BaseHgLoaderMemoryStorage, HgBundle20Loader): | ||||
pass | pass | ||||
class HgArchiveLoaderMemoryStorage(BaseHgLoaderMemoryStorage, | class HgArchiveLoaderMemoryStorage(BaseHgLoaderMemoryStorage, | ||||
HgArchiveBundle20Loader): | HgArchiveBundle20Loader): | ||||
pass | pass |