コード例 #1
0
 def test_tg_init_many(self):
     tg = graphistry.tigergraph(protocol='https',
                                server='127.0.0.1',
                                web_port=10000,
                                api_port=11000,
                                db='z',
                                user='******',
                                pwd='tigergraph2',
                                verbose=False)
     self.assertTrue(type(tg) == graphistry.plotter.Plotter)
コード例 #2
0
 def test_tg_endpoint_url_1_arg(self):
     tg = graphistry.tigergraph(protocol='https',
                                server='127.0.0.1',
                                web_port=10000,
                                api_port=11000,
                                db='z',
                                user='******',
                                pwd='tigergraph2',
                                verbose=False)
     self.assertEqual(
         tg.gsql_endpoint('x', {'f': 1}, dry_run=True),
         'https://*****:*****@127.0.0.1:11000/query/z/x?f=1')
コード例 #3
0
 def test_tg_gsql(self):
     tg = graphistry.tigergraph(protocol='https',
                                server='127.0.0.1',
                                web_port=10000,
                                api_port=11000,
                                db='z',
                                user='******',
                                pwd='tigergraph2',
                                verbose=False)
     self.assertEqual(
         tg.gsql('x', dry_run=True),
         'https://*****:*****@127.0.0.1:10000/gsqlserver/interpreted_query'
     )
コード例 #4
0
 def test_tg_endpoint_url_3_arg(self):
     tg = graphistry.tigergraph(protocol='https',
                                server='127.0.0.1',
                                web_port=10000,
                                api_port=11000,
                                db='z',
                                user='******',
                                pwd='tigergraph2',
                                verbose=False)
     #27 does not preserve order
     self.assertEqual(
         len(
             tg.gsql_endpoint('x', {
                 'f': 1,
                 'ggg': 2,
                 'h': 33
             },
                              dry_run=True)),
         len('https://*****:*****@127.0.0.1:11000/query/z/x?f=1&ggg=2&h=33'
             ))
コード例 #5
0
 def test_tg_init_plain(self):
     tg = graphistry.tigergraph()
     self.assertTrue(type(tg) == graphistry.plotter.Plotter)