# replicator-test.py -- Test script for the replicator. # Gareth Rees, Ravenbrook Limited, 2000-09-07. # $Id: //info.ravenbrook.com/project/p4dti/branch/2000-10-30/mahi-alpha/code/replicator/replicator_test.py#1 $ # # Copyright 2000 Ravenbrook Limited. This document is provided "as is", # without any express or implied warranty. In no event will the authors # be held liable for any damages arising from the use of this document. # You may make and distribute copies and derivative works of this # document provided that (1) you do not charge a fee for this document or # for its distribution, and (2) you retain as they appear all copyright # and licence notices and document history entries, and (3) you append # descriptions of your modifications to the document history. import dt_teamtrack import logger import replicator import socket log_file = open("p4dti.log", "a") logger = logger.multi_logger([logger.file_logger(log_file),logger.file_logger()]) rid = 'case' sid = 'p4_' + socket.gethostname() teamtrack_config = \ { 'logger': logger, } replicator_config = \ { 'logger': logger, 'administrator-address': 'gdr@ravenbrook.com', 'smtp-server': 'martin.ravenbrook.com', } dt = dt_teamtrack.dt_teamtrack(rid, sid, teamtrack_config) r = replicator.replicator(rid, dt, replicator_config) r.init()