Beispiel #1
0
 def test_constructor(self):
     """
     SimpleHintFactory.__init__() Test plan:
         - make sure DISCOUNT_FACTOR, GOAL_REWARD, STD_REWARD
         - make sure self.db is a graphdatabase service
     """
     test_subject = SimpleHintFactory()
     isinstance(test_subject.db,neo4j.GraphDatabaseService).should.equal(True)
     test_subject.DISCOUNT_FACTOR.should.equal(.5)
     test_subject.GOAL_REWARD.should.equal(100)
     test_subject.STD_REWARD.should.equal(0)
Beispiel #2
0
 def setUp(self):
     self.test_subject = SimpleHintFactory()
     self.test_subject.db = neo4j.GraphDatabaseService("http://localhost:7474/db/data/")
     for node in self.test_subject.db.find("_unit_test_only"):
         node.delete_related()