@@ -0,0 +1,1852 @@
+import unittest%0Aimport json%0Aimport logging%0Aimport numpy as np%0Afrom get_database import get_db, get_mode_db, get_section_db%0Afrom recommender import pipeline%0Aimport sys%0Aimport os%0A%0Alogging.basicConfig(level=logging.DEBUG)%0A%0Aclass TestPipeline(unittest.TestCase):%0A  def setUp(self):%0A  %09self.testUserEmails = %5B%22test@example.com%22, %22best@example.com%22, %22fest@example.com%22,%0A                      %22rest@example.com%22, %22nest@example.com%22%5D%0A    self.serverName = 'localhost'%0A%0A    self.testUsers = %5B%5D%0A    for userEmail in self.testUserEmails:%0A      User.register(userEmail)%0A      self.testUsers += %5BUser.fromEmail(section%5B'user_id'%5D)%5D # can access uuid with .uuid%0A%0A    # import data from tests/data/testModeInferFiles%0A%0A    self.pipeline = pipeline.ModeRecommendationPipeline()%0A    self.testRecommendationPipeline()%0A    # register each of the users and add sample trips to each user%0A%0A  def tearDown(self):%0A  %09for testUser in self.testUsersEmails:%0A      purge_database_json.purgeData('localhost', testUser)%0A%0A  def testTargetTripsPipeline(self):%0A  %09self.testTargetTrips = %5Bpipeline.getTargetTrips(testUser.uuid) for testUser in testUsers%5D%0A  %09# series of assertions to check output%0A%0A  def testAugmentTripsPipeline(self):%0A  %09# call functions in the augment_trips_pipeline file using trips from self.testTargetTrips%0A  %09# assertions to check various characteristics of output%0A   %09%0A  def testUtilityModelPipeline(self):%0A  %09# call functions from utility_model_pipeline.py and using augmented trips from testAugmentTripsPipeline and self.testUsers%0A  %09# assertions to check various characteristics of output%0A%0A  def testRecommendationPipeline(self):%0A  %09self.testTripsToImprovePipeline();%0A    self.testUtilityModelPipeline();%0A    self.testRecommendationPipeline();%0A    # assertions to check various characteristcs of pipeline overall%0A%0Aif __name__ == '__main__':%0A    unittest.main()

Add a simple test script that invokes the pipeline