@@ -0,0 +1,1038 @@
+from taiga.requestmaker import RequestMaker, RequestMakerException%0Afrom taiga.models.base import InstanceResource, ListResource%0Afrom taiga.models import Task%0Afrom taiga import TaigaAPI%0Aimport taiga.exceptions%0Aimport json%0Aimport requests%0Aimport unittest%0Afrom mock import patch%0Afrom .tools import create_mock_json%0Afrom .tools import MockResponse%0Aimport six%0A%0Aif six.PY2:%0A    import_open = '__builtin__.open'%0Aelse:%0A    import_open = 'builtins.open'%0A%0Aclass TestTasks(unittest.TestCase):%0A%0A    @patch(import_open)%0A    @patch('taiga.models.base.ListResource._new_resource')%0A    def test_file_attach(self, mock_new_resource, mock_open):%0A        fd = open('tests/resources/tasks_list_success.json')%0A        mock_open.return_value = fd%0A        rm = RequestMaker('/api/v1', 'fakehost', 'faketoken')%0A        task = Task(rm, id=1, project=1)%0A        task.attach('tests/resources/tasks_list_success.json')%0A        mock_new_resource.assert_called_with(%0A            files=%7B'attached_file': fd%7D,%0A            payload=%7B'project': 1, 'object_id': 1%7D%0A        )

Add tests for tasks