Esempio n. 1
0
    def test_successfully_delete_templates(self, mock_requests):
        """
        Should successfully delete templates.
        """
        args = {
            "url": "{0}/template".format(MOCK_CONFIG['dojot']['url']),
            "headers": {
                "Authorization": "Bearer {0}".format(self.jwt),
            },
        }

        DojotAPI.delete_templates(self.jwt)

        DojotAPI.call_api.assert_called_once()
        DojotAPI.call_api.assert_called_with(mock_requests.delete, args, False)
Esempio n. 2
0
 def delete_templates(self, ) -> None:
     """
     Deletes all devices.
     """
     DojotAPI.delete_templates(self.jwt)