Esempio n. 1
0
def generate_sync_config(user_id: str,
                         device_id: Optional[str] = "device_id") -> SyncConfig:
    """Generate a sync config (with a unique request key)."""
    global _request_key
    _request_key += 1
    return SyncConfig(
        user=UserID.from_string(user_id),
        filter_collection=Filtering(Mock()).DEFAULT_FILTER_COLLECTION,
        is_guest=False,
        request_key=("request_key", _request_key),
        device_id=device_id,
    )
Esempio n. 2
0
 def build_filtering(self):
     return Filtering(self)
Esempio n. 3
0
 def get_filtering(self) -> Filtering:
     return Filtering(self)