def testPlantUML(self): if not getpass.getuser() == "travis": wikibot = WikiBot.ofWikiId("rq") smw = SMW(wikibot.site) ask = """{{#ask: [[Concept:SchemaProperty]][[SchemaProperty schema::ConfIDentSchema]] |mainlabel=SchemaProperty | ?SchemaProperty parent = parent | ?SchemaProperty cardinality = cardinality | ?SchemaProperty kind = kind | ?SchemaProperty definition = definition | ?SchemaProperty comment = comment | ?SchemaProperty allowedValue = allowedValue | ?SchemaProperty examples = examples | ?SchemaProperty name = name | ?SchemaProperty type = type | ?SchemaProperty mapsTo = mapsTo | ?SchemaProperty id = id | ?SchemaProperty schema = schema |sort=SchemaProperty kind,SchemaProperty name |order=ascending,ascending | limit=200 }}""" result = smw.query(ask) if TestPlantUML.debug: print(result) pu = PlantUML("http://rq.bitplan.com/index.php") pu.generate(result)
def test_ask(self): """ test using the SMW ask API """ if not getpass.getuser() == "travis": wikibot = WikiBot.ofWikiId("rq") smw = SMW(wikibot.site) ask = """{{#ask: [[Concept:SchemaProperty]][[SchemaProperty schema::ConfIDentSchema]] |mainlabel=SchemaProperty | ?SchemaProperty parent = parent | ?SchemaProperty cardinality = cardinality | ?SchemaProperty kind = kind | ?SchemaProperty definition = definition | ?SchemaProperty comment = comment | ?SchemaProperty allowedValue = allowedValue | ?SchemaProperty examples = examples | ?SchemaProperty name = name | ?SchemaProperty type = type | ?SchemaProperty mapsTo = mapsTo | ?SchemaProperty id = id | ?SchemaProperty schema = schema |sort=SchemaProperty kind,SchemaProperty name |order=ascending,ascending | limit=200 }}""" result = smw.query(ask) if TestWikiAccess.debug: print(result)