Esempio n. 1
0
	def remove_AcmeDb(self, num_of_cust):
		"""
		Drop all AcmeAir databases
		"""
		acmeair = AcmeAirUtils()
		if acmeair.is_acmeair_running() != 0:
			acmeair.stop_acmeair()
			
		cloudantUtils = CloudantDbUtils(test_properties)
		cloudantUtils.drop_all_databases()		
Esempio n. 2
0
    def remove_AcmeDb(self, num_of_cust):
        """
		Drop all AcmeAir databases
		"""
        acmeair = AcmeAirUtils()
        if acmeair.is_acmeair_running() != 0:
            acmeair.stop_acmeair()

        cloudantUtils = CloudantDbUtils(test_properties)
        cloudantUtils.drop_all_databases()
Esempio n. 3
0
	def load_AcmeData(self, num_of_cust):
		"""
		Reset databases and use the AcmeAir database loader to populate initial customer,
		flight and airportmapping data. Does NOT generate user data like bookings.
		"""	
		print ("num_of_cust: ", num_of_cust)
			
		acmeair = AcmeAirUtils()	
		try:
			if acmeair.is_acmeair_running() != 0:
				raise RuntimeError("""
				AcmeAir is already running which may cause unexpected results when
				resetting databases.  Please shut down the app and try again.
				""")
			else:
				cloudantUtils = CloudantDbUtils(test_properties)
				cloudantUtils.reset_databases()
				acmeair.start_acmeair()
				acmeair.load_data(num_of_cust)
		
		finally:
			acmeair.stop_acmeair()
Esempio n. 4
0
    def load_AcmeData(self, num_of_cust):
        """
		Reset databases and use the AcmeAir database loader to populate initial customer,
		flight and airportmapping data. Does NOT generate user data like bookings.
		"""
        print("num_of_cust: ", num_of_cust)

        acmeair = AcmeAirUtils()
        try:
            if acmeair.is_acmeair_running() != 0:
                raise RuntimeError("""
				AcmeAir is already running which may cause unexpected results when
				resetting databases.  Please shut down the app and try again.
				""")
            else:
                cloudantUtils = CloudantDbUtils(test_properties)
                cloudantUtils.reset_databases()
                acmeair.start_acmeair()
                acmeair.load_data(num_of_cust)

        finally:
            acmeair.stop_acmeair()