def test_sales(self): id = [7, 8, 9, 10] client = ["Alex Green", "James Brown", "Robert Gray", "Jessy Blue"] products = [[ "Hamburguer de Frango", "Hamburguer de Frango", "Hamburguer de Picanha", "Hamburguer de Picanha" ], ["Hamburguer Vegano", "Hamburguer de Picanha", "Pizza Calabresa"], ["Pizza Calabresa", "Refrigerante"], ["Pizza de Frango", "Batata Frita", "Refrigerante"]] qtd = [[2, 3, 1, 2], [1, 2, 1], [1, 2, 3], [1, 3, 3]] value = [90.5, 75.5, 50.9, 101.3] fields = "id,client,product,quantity,value" for i, _ in enumerate(id): for j, product in enumerate(products[i]): values = f"'{id[i]}','{client[i]}','{product}','{qtd[i]}','{value[i]}'" try: conn = Conn() self.assertEqual( conn._insertItem(fields, values, table="sale"), True) except Exception as e: print("TEST_CLIENT============>", e)
def test_client(self): name = ["Alex Green","James Brown","Robert Gray","Jessy Blue"] points = [600, 100, 500, 1000] email = ["*****@*****.**", "*****@*****.**", "*****@*****.**", "*****@*****.**"] fields = "name,points,email" for i, _ in enumerate(name): values=f"'{name[i]}','{points[i]}','{str(email[i])}'" try: conn = Conn() self.assertEqual(conn._insertItem(fields, values, table="client"), True) except Exception as e: print("TEST_CLIENT============>", e)
def testData(self): name = [ "Hamburguer de Frango", "Hamburguer de Picanha", "Hamburguer Vegano", "Pizza Calabresa", "Pizza de Frango", "Batata Frita", "Refrigerante" ] price = [12.90, 15.90, 12.90, 19.90, 17.90, 9.90, 4.90] description = [ "Mussum Ipsum, cacilds vidis litro abertis. Sapien in monti palavris qui num significa nadis i pareci latim. Detraxit consequat et quo num tendi nada. Manduma pindureta quium dia nois paga. Diuretics paradis num copo é motivis de denguis.", "Mussum Ipsum, cacilds vidis litro abertis. Diuretics paradis num copo é motivis de denguis. Si u mundo tá muito paradis? Toma um mé que o mundo vai girarzis! Quem num gosta di mim que vai caçá sua turmis! Nec orci ornare consequat. Praesent lacinia ultrices consectetur. Sed non ipsum felis.", "Mussum Ipsum, cacilds vidis litro abertis. Detraxit consequat et quo num tendi nada. Quem manda na minha terra sou euzis! Leite de capivaris, leite de mula manquis sem cabeça. Interessantiss quisso pudia ce receita de bolis, mais bolis eu num gostis.", "Mussum Ipsum, cacilds vidis litro abertis. Aenean aliquam molestie leo, vitae iaculis nisl. Si u mundo tá muito paradis? Toma um mé que o mundo vai girarzis! Viva Forevis aptent taciti sociosqu ad litora torquent. Vehicula non. Ut sed ex eros. Vivamus sit amet nibh non tellus tristique interdum.", "Mussum Ipsum, cacilds vidis litro abertis. Vehicula non. Ut sed ex eros. Vivamus sit amet nibh non tellus tristique interdum. Quem num gosta di mé, boa gentis num é. Praesent vel viverra nisi. Mauris aliquet nunc non turpis scelerisque, eget. Suco de cevadiss, é um leite divinis, qui tem lupuliz, matis, aguis e fermentis.", "Mussum Ipsum, cacilds vidis litro abertis. Nec orci ornare consequat. Praesent lacinia ultrices consectetur. Sed non ipsum felis. Pra lá , depois divoltis porris, paradis. Aenean aliquam molestie leo, vitae iaculis nisl. Si num tem leite então bota uma pinga aí cumpadi!", "Mussum Ipsum, cacilds vidis litro abertis. Quem num gosta di mé, boa gentis num é. Praesent vel viverra nisi. Mauris aliquet nunc non turpis scelerisque, eget. Pra lá , depois divoltis porris, paradis. Copo furadis é disculpa de bebadis, arcu quam euismod magna." ] image = [ "https://exame.com/wp-content/uploads/2020/09/the-sandwich-popeyes-burger-king-e1599567751664.jpg?quality=70&strip=info&w=1024", "https://upload.wikimedia.org/wikipedia/commons/6/62/NCI_Visuals_Food_Hamburger.jpg", "https://aletp.com.br/wp-content/uploads/2017/10/mcvegan.jpg", "https://www.alegrafoods.com.br/wp-content/uploads/2020/07/9-img-blog.png", "https://www.hojetemfrango.com.br/wp-content/uploads/2019/01/shutterstock_333724454.jpg", "https://s2.glbimg.com/6TYFXwek9ZpNXFeOzas09KizMKk=/0x0:1280x853/924x0/smart/filters:strip_icc()/i.s3.glbimg.com/v1/AUTH_e84042ef78cb4708aeebdf1c68c6cbd6/internal_photos/bs/2020/T/K/Hh8h2GR96v392DAkAqyA/912c9713-321e-4dfd-bca9-888c05c5ce50.jpeg", "http://i.mlcdn.com.br/portaldalu/fotosconteudo/43225.jpg" ] fields = "name,description,price,image" for i, _ in enumerate(name): values = f"'{name[i]}','{description[i]}','{str(price[i])}','{image[i]}'" try: conn = Conn() self.assertEqual( conn._insertItem(fields, values, table="product"), True) except Exception as e: print("TEST_PRODUCT============>", e)