예제 #1
0
 def testCurrSpotPrice(self):
     stop_date = dt.datetime.now().isoformat()
     start_date = (dt.datetime.now()-dt.timedelta(hours=1680)).isoformat()
     result=spc.get_periodic_spot_price(["Linux/UNIX"], ["t1.micro"], ["us-west-2"], ["us-west-2a"], "none", "json",1,168, start_date , stop_date)
     print("len %s"%len(result))
     assert isinstance(result[0]['price'],float)
     assert len(result)==10 or len(result)==9 or len(result)==11
     pass
예제 #2
0
 def testCurrSpotPrice(self):
     result=spc.list_all_spot_price(["Linux/UNIX"], ["t1.micro"], ["us-west-2"], [], "none", "json",8)
     assert isinstance(result[0]['price'],float)
     pass