Ejemplo n.º 1
0
 def test_instance_creation_rexster(self):
     """
     Tests that a rexster instance is created.
     """
     instance = Instance(name=self.instanceName, engine=self.instanceEngine, port=self.instancePort, path=self.instancePath, owner=self.u)
     instance.save()
     self.assertIsNotNone(instance)
Ejemplo n.º 2
0
 def test_instance_gdb_rexster(self):
     """
     Tests that a rexster instance has a graph database (TODO).
     """
     instance = Instance(name=self.instanceName, engine=self.instanceEngine, port="7373", path="db/sylva", owner=self.u)
     instance.save()
     self.assertIsNotNone(instance)
     self.assertIsNotNone(self.sylva_graph)
Ejemplo n.º 3
0
 def test_instance_edition_rexster(self):
     """
     Tests that a rexster instance is edited.
     """
     instance = Instance(name=self.instanceName, engine=self.instanceEngine, port=self.instancePort, path=self.instancePath, owner=self.u)
     instance.save()
     self.assertIsNotNone(instance)
     self.assertEqual(instance.name, self.instanceName)
     instance.name = "instanceRexsterSet"
     self.assertEqual(instance.name, "instanceRexsterSet")
Ejemplo n.º 4
0
 def test_instance_gdb_neo4j(self):
     """
     Tests that a neo4j instance has a graph database.
     """
     instance = Instance(name=self.instanceName, engine=self.instanceEngine, port="7373", path="db/sylva", owner=self.u)
     instance.save()
     self.assertIsNotNone(instance)
     self.assertIsNotNone(self.sylva_graph)
     gdb = instance.get_gdb(self.sylva_graph)
     self.assertIsNotNone(gdb)
Ejemplo n.º 5
0
 def test_instance_gdb_rexster(self):
     """
     Tests that a rexster instance has a graph database (TODO).
     """
     port = settings.GRAPHDATABASES["default"]["PORT"]
     path = settings.GRAPHDATABASES["default"]["NAME"]
     instance = Instance(name=self.instanceName, engine=self.instanceEngine,
                         port=port, path=path, owner=self.u)
     instance.save()
     self.assertIsNotNone(instance)
     self.assertIsNotNone(self.sylva_graph)
Ejemplo n.º 6
0
def create_and_get_gdb(test):
    port = test.instancePort
    path = test.instancePath
    instance = Instance(name=test.instanceName, engine=test.instanceEngine,
                        port=port, path=path, owner=test.user)
    instance.save()
    test.assertIsNotNone(instance)
    test.assertIsNotNone(test.graph)
    gdb = instance.get_gdb(test.graph)
    test.assertIsNotNone(gdb)
    return gdb
Ejemplo n.º 7
0
 def test_instance_gdb_rexster(self):
     """
     Tests that a rexster instance has a graph database (TODO).
     """
     port = settings.GRAPHDATABASES["default"]["PORT"]
     path = settings.GRAPHDATABASES["default"]["NAME"]
     instance = Instance(name=self.instanceName,
                         engine=self.instanceEngine,
                         port=port,
                         path=path,
                         owner=self.u)
     instance.save()
     self.assertIsNotNone(instance)
     self.assertIsNotNone(self.sylva_graph)
Ejemplo n.º 8
0
def create_and_get_gdb(test):
    port = test.instancePort
    path = test.instancePath
    instance = Instance(name=test.instanceName,
                        engine=test.instanceEngine,
                        port=port,
                        path=path,
                        owner=test.user)
    instance.save()
    test.assertIsNotNone(instance)
    test.assertIsNotNone(test.graph)
    gdb = instance.get_gdb(test.graph)
    test.assertIsNotNone(gdb)
    return gdb
Ejemplo n.º 9
0
 def test_instance_deletion_neo4j(self):
     """
     Tests that a neo4j instance is deleted.
     """
     instance = Instance(name=self.instanceName, engine=self.instanceEngine, port=self.instancePort, path=self.instancePath, owner=self.u)
     instance.save()
     self.assertIsNotNone(instance)
     instance_id = instance.id
     Instance.objects.get(pk=instance_id).delete()
     try:
         Instance.objects.get(pk=instance_id)
         exists = True
     except Instance.DoesNotExist:
         exists = False
     self.assertEqual(exists, False)