44
55
66class WebsiteSaleTaxesToggleHttpCase (HttpCase ):
7-
87 def setUp (self ):
98 super ().setUp ()
109 # Get company for Mitchel Admin user
11- self .user_admin = self .env .ref (' base.user_admin' )
10+ self .user_admin = self .env .ref (" base.user_admin" )
1211 user_company = self .user_admin .company_id
13- self .tax = self .env ['account.tax' ].create ({
14- 'name' : 'Taxes toggle test tax' ,
15- 'amount_type' : 'percent' ,
16- 'amount' : 15 ,
17- 'type_tax_use' : 'sale' ,
18- 'company_id' : user_company .id ,
19- })
20- self .product_template = self .env ['product.template' ].create ({
21- 'name' : 'Product test tax toggle' ,
22- 'list_price' : 750.00 ,
23- 'taxes_id' : [(6 , 0 , self .tax .ids )],
24- 'website_published' : True ,
25- 'website_sequence' : 9999 ,
26- })
27- pricelist = self .env ['product.pricelist' ].create ({
28- 'name' : 'Price list for tests' ,
29- 'currency_id' : user_company .currency_id .id
30- })
12+ self .tax = self .env ["account.tax" ].create (
13+ {
14+ "name" : "Taxes toggle test tax" ,
15+ "amount_type" : "percent" ,
16+ "amount" : 15 ,
17+ "type_tax_use" : "sale" ,
18+ "company_id" : user_company .id ,
19+ }
20+ )
21+ self .product_template = self .env ["product.template" ].create (
22+ {
23+ "name" : "Product test tax toggle" ,
24+ "list_price" : 750.00 ,
25+ "taxes_id" : [(6 , 0 , self .tax .ids )],
26+ "website_published" : True ,
27+ "website_sequence" : 9999 ,
28+ }
29+ )
30+ pricelist = self .env ["product.pricelist" ].create (
31+ {"name" : "Price list for tests" , "currency_id" : user_company .currency_id .id }
32+ )
3133 self .env .user .partner_id .property_product_pricelist = pricelist
3234 # To avoid currency converter
33- self .env [' res.currency.rate' ].search ([]).write ({
34- ' rate' : 1 ,
35- } )
35+ self .env [" res.currency.rate" ].search ([]).write (
36+ { " rate" : 1 ,}
37+ )
3638
3739 def test_ui_website (self ):
3840 """Test frontend tour."""
@@ -44,5 +46,5 @@ def test_ui_website(self):
4446 url_path = "/shop" ,
4547 code = "%s.run('%s')" % tour ,
4648 ready = "%s.tours['%s'].ready" % tour ,
47- login = "admin"
49+ login = "admin" ,
4850 )
0 commit comments