thermondo / closeio

(deprecated/unused) A small API library to access close.io CRM
Other
3 stars 1 forks source link

Make several testing stub methods tz aware #125

Closed amureki closed 6 years ago

amureki commented 6 years ago

Description

Real Closeio API during lead and task creation provides datetimes with TZ data, so to be accurate we need to update our testing stub.

How to test

You can create a task and will see the response you'll get:

In [13]: closeio.create_task(lead_id='YOUR_LEAD_ID', assigned_to='YOUR_USER_ID', text='PRtest')
Out[13]:
{'_type': 'lead',
 'assigned_to': 'HIDDEN',
 'assigned_to_name': 'HIDDEN',
 'contact_id': None,
 'contact_name': None,
 'created_by': 'HIDDEN',
 'created_by_name': 'HIDDEN',
 'date': datetime.date(2018, 5, 31),
 'date_created': datetime.datetime(2018, 5, 31, 15, 4, 25, 274000, tzinfo=tzutc()),
 'date_updated': datetime.datetime(2018, 5, 31, 15, 4, 25, 274000, tzinfo=tzutc()),
 'due_date': None,
 'id': 'HIDDEN',
 'is_complete': False,
 'is_dateless': True,
 'lead_id': 'HIDDEN',
 'lead_name': 'HIDDEN',
 'object_id': None,
 'object_type': None,
 'organization_id': 'HIDDEN',
 'text': 'PRtest',
 'updated_by': 'HIDDEN',
 'updated_by_name': 'HIDDEN',
 'view': 'inbox'}
codecov[bot] commented 6 years ago

Codecov Report

Merging #125 into master will not change coverage. The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #125   +/-   ##
=======================================
  Coverage   41.22%   41.22%           
=======================================
  Files           9        9           
  Lines         781      781           
=======================================
  Hits          322      322           
  Misses        459      459
Impacted Files Coverage Δ
closeio/contrib/testing_stub.py 0% <0%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c65ac0a...4754d71. Read the comment docs.

amureki commented 6 years ago

@codingjoe @mostafa-anm many thanks! ✨