def setUp(self): unittest.TestCase.setUp(self) server = gnats.Server('somehost') conn = FakeServerConnectionForDB(server) self.db = Database(server, 'testdb', conn) self.db._validate = self.my_validate self.pr_in = '' self.validate_in = ''
def setUp(self): unittest.TestCase.setUp(self) server = gnats.Server('somehost') conn = FakeServerConnectionForDB(server) self.db = Database(server, 'testdb', conn) self.db.validate_field = self.my_validate_field self.fname_in = [] self.pr_in = [] self.check_cr_in = [] self.vf_out = []
parser.add_option('-H', '--host', dest='host', action="store", help='Host to connect to, defaults to "%default".', default='localhost') parser.add_option('-d', '--database', dest='db', action="store", help='Database to connect to, defaults to "%default".', default='default') parser.add_option('-q', '--quiet', dest='quiet', action="store_true", help='Emit no output', default=False) options, args = parser.parse_args() if options.quiet: logging.basicConfig(level=logging.FATAL) else: logging.basicConfig(level=logging.DEBUG) db = gnats.Server(options.host, port=options.port).get_database(options.db) if not options.quiet: print db # for f in db.list_fields(): # print f
def setUp(self): unittest.TestCase.setUp(self) server = gnats.Server('somehost') conn = FakeServerConnectionForDB(server) self.db = Database(server, 'testdb', conn)
def setUp(self): self.server = gnats.Server('somehost') self.conn = FakeServerConnectionForDB(self.server) self.db = Database(self.server, 'testdb', self.conn)
def setUp(self): self.server = gnats.Server('somehost') self.conn = FakeServerConnectionForDB(self.server) self.db = Database(self.server, 'testdb', self.conn) self.tfield = self.db.fields['change-log']
def setUp(self): self.server = gnats.Server('somehost') self.conn = FakeServerConnectionForDB(self.server) self.db = Database(self.server, 'testdb', self.conn) self.enum = self.db.fields['enum-fld'] self.multi = self.db.fields['multienum-fld']
def setUp(self): self.server = gnats.Server('somehost') self.conn = FakeServerConnectionForDB(self.server) gnats.metadata_level = gnats.FULL_METADATA