1212 Do not edit the class manually.
1313""" # noqa: E501
1414
15-
15+ import json
16+ import fattureincloud_python_sdk
1617import unittest
18+ from functions import json_serial
1719
20+ from fattureincloud_python_sdk .models .tax_profile import TaxProfile
1821from fattureincloud_python_sdk .models .get_tax_profile_response import (
1922 GetTaxProfileResponse ,
2023)
2124
2225
26+
2327class TestGetTaxProfileResponse (unittest .TestCase ):
2428 """GetTaxProfileResponse unit test stubs"""
2529
@@ -28,59 +32,47 @@ def setUp(self):
2832
2933 def tearDown (self ):
3034 pass
31-
32- def make_instance (self , include_optional ) -> GetTaxProfileResponse :
33- """Test GetTaxProfileResponse
34- include_optional is a boolean, when False only required
35- params are included, when True both required and
36- optional params are included"""
37- # uncomment below to create an instance of `GetTaxProfileResponse`
38- """
39- model = GetTaxProfileResponse()
40- if include_optional:
41- return GetTaxProfileResponse(
42- data = fattureincloud_python_sdk.models.tax_profile.TaxProfile(
43- company_type = '',
44- company_subtype = '',
45- profession = '',
46- regime = '',
47- rivalsa_name = '',
48- default_rivalsa = 1.337,
49- cassa_name = '',
50- default_cassa = 1.337,
51- default_cassa_taxable = 1.337,
52- cassa2_name = '',
53- default_cassa2 = 1.337,
54- default_cassa2_taxable = 1.337,
55- default_withholding_tax = 1.337,
56- default_withholding_tax_taxable = 1.337,
57- default_other_withholding_tax = 1.337,
58- enasarco = True,
59- enasarco_type = '',
60- contributions_percentage = 1.337,
61- profit_coefficient = 1.337,
62- med = True,
63- default_vat = fattureincloud_python_sdk.models.vat_type.VatType(
64- id = 56,
65- value = 22,
66- description = 'Non imponibile art. 123',
67- notes = 'IVA non imponibile ai sensi dell'articolo 123, comma 2',
68- e_invoice = True,
69- ei_type = '2',
70- ei_description = '',
71- editable = True,
72- is_disabled = True,
73- default = True, ), )
74- )
75- else:
76- return GetTaxProfileResponse(
77- )
78- """
79-
35+
8036 def testGetTaxProfileResponse (self ):
8137 """Test GetTaxProfileResponse"""
82- # inst_req_only = self.make_instance(include_optional=False)
83- # inst_req_and_optional = self.make_instance(include_optional=True)
38+ model = GetTaxProfileResponse (
39+ data = TaxProfile (
40+ company_type = "individual" ,
41+ company_subtype = "artigiani" ,
42+ profession = "test" ,
43+ regime = "forfettario_5" ,
44+ rivalsa_name = "" ,
45+ default_rivalsa = 0 ,
46+ cassa_name = "" ,
47+ default_cassa = 0 ,
48+ default_cassa_taxable = 100 ,
49+ cassa2_name = "" ,
50+ default_cassa2 = 0 ,
51+ default_cassa2_taxable = 0 ,
52+ default_withholding_tax = 0 ,
53+ default_withholding_tax_taxable = 100 ,
54+ default_other_withholding_tax = 0 ,
55+ enasarco = False ,
56+ enasarco_type = "test" ,
57+ contributions_percentage = 0 ,
58+ med = False ,
59+ default_vat = {
60+ "id" : 66 ,
61+ "value" : 0 ,
62+ "description" : "Contribuenti forfettari" ,
63+ "notes" : "Operazione non soggetta a IVA ai sensi dell'art. 1, commi 54-89, Legge n. 190/2014 e succ. modifiche/integrazioni" ,
64+ "e_invoice" : True ,
65+ "ei_type" : "2.2" ,
66+ "ei_description" : "Non soggetta art. 1/54-89 L. 190/2014 e succ. modifiche/integrazioni" ,
67+ "editable" : False ,
68+ "is_disabled" : False ,
69+ "default" : True ,
70+ }
71+ )
72+ )
73+ expected_json = '{"data": {"company_type": "individual", "company_subtype": "artigiani", "profession": "test", "regime": "forfettario_5", "rivalsa_name": "", "default_rivalsa": 0, "cassa_name": "", "default_cassa": 0, "default_cassa_taxable": 100, "cassa2_name": "", "default_cassa2": 0, "default_cassa2_taxable": 0, "default_withholding_tax": 0, "default_withholding_tax_taxable": 100, "default_other_withholding_tax": 0, "enasarco": false, "enasarco_type": "test", "contributions_percentage": 0, "med": false, "default_vat": {"id": 66, "value": 0, "description": "Contribuenti forfettari", "notes": "Operazione non soggetta a IVA ai sensi dell\' art. 1, commi 54-89, Legge n. 190/2014 e succ. modifiche/integrazioni", "e_invoice": true, "ei_type": "2.2", "ei_description": "Non soggetta art. 1/54-89 L. 190/2014 e succ. modifiche/integrazioni", "is_disabled": false, "default": true}}}' ;
74+ actual_json = json .dumps (model .to_dict (), default = json_serial )
75+ assert actual_json == expected_json
8476
8577
8678if __name__ == "__main__" :
0 commit comments