Module 3 build failure

sir i am stuck with this build failure issue
I have tried for 4 times waiting for an hour each time
I have tried even creating a new app new board new access token
every time it shows build failure for pinterest

sir please see my code base suggest any corrections or at least give any hints
I am stuck

have u read the docs?

may be it is happening because of pinterest api limit just look into unittesting.log file you will find the mistake

yes i know its showing api limit exceeded
but even after waiting 4 hours and trying aagain it shows the same

if the pinterest api limit is crossed generate new access token and create new board id

2020-01-25 12:53:45,750 unitTesting INFO Running pytest
2020-01-25 12:53:55,680 unitTesting INFO ============================= test session starts ==============================
platform linux – Python 3.6.9, pytest-5.3.1, py-1.8.0, pluggy-0.12.0
Django settings: qeats.settings (from ini file)
rootdir: /tijira1999sahoo-ME_QEATS_REVIEW_MP-b500b016-3f71-11ea-a677-ab9de2375cce/tijira1999sahoo-ME_QEATS_REVIEW_MP, inifile: pytest.ini
plugins: django-3.5.1, mock-1.10.4
collected 3 items

tests/ …F [100%]

=================================== FAILURES ===================================
________________ TestSocialSharing.test_post_to_pinterest_share ________________

self = <tests.test_views.TestSocialSharing object at 0x3eb7dc4b5eb8>

def test_post_to_pinterest_share(self):
    client = Client()
    prefix = os.getenv('USER_SOLUTION')
    if prefix is None:
        prefix = '.'

    image_path = prefix + '/tests/sneakpeak.jpg'
    img_b64 = restaurants.image_uploader.file_path_to_img64(image_path)
    import datetime
    message = 'Great Work!!! Completed module 2 @ {}'.format(str(
    request_body = {
                    'imgBase64' : img_b64.decode('utf-8'),
                    'text' : message,
                    'orderId' : '0x12312',
                    'tags' : ['Pinterest', 'Module2'],
                    'share' : ['Pinterest']
    resp ='/qeats/v1/review/share', data=request_body, content_type='application/json')
    resp.status_code == 200
    pinterest_test_util = PinterestTestUtil()
    message_expected = message + ' #Pinterest #Module2'
  assert pinterest_test_util.check_whether_message_is_published(message_expected, image_path)

E AssertionError: assert False
E + where False = <bound method PinterestTestUtil.check_whether_message_is_published of <tests.test_views.PinterestTestUtil object at 0x3eb7dc46e668>>(‘Great Work!!! Completed module 2 @ 2020-01-25 12:53:54.519242 #Pinterest #Module2’, ‘/tijira1999sahoo-ME_QEATS_REVIEW_MP-b500b016-3f71-11ea-a677-ab9de2375cce/tijira1999sahoo-ME_QEATS_REVIEW_MP/tests/sneakpeak.jpg’)
E + where <bound method PinterestTestUtil.check_whether_message_is_published of <tests.test_views.PinterestTestUtil object at 0x3eb7dc46e668>> = <tests.test_views.PinterestTestUtil object at 0x3eb7dc46e668>.check_whether_message_is_published

tests/ AssertionError
----------------------------- Captured stdout call -----------------------------
{‘message’: ‘You have exceeded your rate limit. Try again later.’, ‘type’: ‘api’}

Pinterest API: Looks you have hit the per hour API limit

=============================== warnings summary ===============================
/usr/local/lib/python3.6/dist-packages/_pytest/ PytestDeprecationWarning: The ‘junit_family’ default value will change to ‘xunit2’ in pytest 6.0.
Add ‘junit_family=legacy’ to your pytest.ini file to silence this warning and make your suite compatible.
_issue_warning_captured(deprecated.JUNIT_XML_DEFAULT_FAMILY, config.hook, 2)

– Docs:

  • generated xml file: /tijira1999sahoo-ME_QEATS_REVIEW_MP-b500b016-3f71-11ea-a677-ab9de2375cce/tijira1999sahoo-ME_QEATS_REVIEW_MP/tests.xml -
    ==================== 1 failed, 2 passed, 1 warning in 7.82s ====================

2020-01-25 12:53:55,742 unitTesting INFO Pytest run complete
2020-01-25 12:53:55,750 unitTesting INFO Report generated: {‘tests.test_views.TestSocialSharing.test_post_to_facebook_share’: ‘TEST_STATUS_SUCCESS’, ‘tests.test_views.TestSocialSharing.test_post_to_pinterest_share’: ‘TEST_STATUS_FAILURE’, ‘tests.test_views.TestSocialSharing.test_post_to_facebook_share_cli’: ‘TEST_STATUS_SUCCESS’}

have u tried with new access token and new board id?

sir i have tried it with new access token new board new app

what’s the message after trying with new access token and board id?

same api limit exceeded

can you please recheck that whether you had use your new access token or not?

@tijira looks like you only changed the boardId and not the accesstoken in your new push request. Please change both of them.Screenshot_2020-01-25 ME_QEATS_REVIEW_MP_MODULE_PINTEREST_SHARE (ceaad36f) · Commits · COHORT_ME_QEATS_REVIEW_MP_ENROLL_LAU...

1 Like

thanks a ton sir I wish I could have your valuable answer 4 hours ago
this sorted out my problem

thnx thnx thnx

please mark the comment as solution to close the thread, your welcome :slight_smile:

my pleasure and thanks to @Vinod_Crio_TA

1 Like