def test_add_customer_tags(self, mock_get):
     c = Customer(node=self.node,
                  base=Properties(contacts=Properties(email='email')))
     c.extended.prova = 'prova'
     c.tags.auto = ['auto']
     c.tags.manual = ['manual']
     self.node.add_customer(**c.to_dict())
     body = {
         'nodeId': self.node.node_id,
         'base': {
             'contacts': {
                 'email': 'email'
             }
         },
         'extended': {
             'prova': 'prova'
         },
         'tags': {
             'auto': ['auto'],
             'manual': ['manual']
         }
     }
     mock_get.assert_called_with(self.base_url,
                                 headers=self.headers_expected,
                                 json=body)
 def test_update_customer_full(self, mock_get):
     c = Customer(
         node=self.node,
         id='01',
         base=Properties(contacts=Properties(email='email', fax='fax')))
     c.base.contacts.email = 'email1234'
     self.node.update_customer(full_update=True, **c.to_dict())
     body = {
         'id': '01',
         'base': {
             'contacts': {
                 'email': 'email1234',
                 'fax': 'fax'
             }
         },
         'extended': {},
         'tags': {
             'auto': [],
             'manual': []
         }
     }
     mock_get.assert_called_with(self.base_url + '/01',
                                 headers=self.headers_expected,
                                 json=body)