Assessment Failed for test case 2

  1. Describe the issue briefly
    Test case 2 is getting failed even if my review was posted successfully.
  2. How much time have you spent debugging this issue?
    (Please spend at least 15 minutes to resolve the issue on your own before posting a new topic here)
    30mins
  3. What is your hypothesis?
    There are errors in tests/test_views.py file.

setup.log

2020-05-09 07:46:50,015 setup        INFO     Module ID: ME_QEATS_REVIEW_MP_MODULE_FACEBOOK_SHARE_FROM_APK
2020-05-09 07:46:52,689 setup        INFO     Setup complete!

unitTesting.log

2020-05-09 07:46:54,465 unitTesting  INFO     Running pytest
2020-05-09 07:47:15,919 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: /p-harikesh409-ME_QEATS_REVIEW_MP-3b92c9d0-91c9-11ea-8aa9-bd0f2a7a7808/p-harikesh409-ME_QEATS_REVIEW_MP, inifile: pytest.ini
plugins: django-3.5.1, mock-1.10.4
collected 2 items

tests/test_views.py F.                                                   [100%]

=================================== FAILURES ===================================
______________ TestSocialSharing.test_post_to_facebook_share_cli _______________

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

    def test_post_to_facebook_share_cli(self):
    
        facebook = restaurants.facebook_post.Facebook()
        image_url = 'https://hebbarskitchen.com/wp-content/uploads/2019/05/gadbad-ice-cream-recipe-gudbud-ice-cream-gadi-badi-ice-cream-2-1920x1280.jpeg'
        my_name = self.get_user_name()
    
        message = my_name + ' completed FACEBOOK CLI module! @ {}'.format(str(datetime.datetime.now()))
        print(message)
        facebook.publish_photo_msg(message, image_url)
    
        facebook_test_util = FacebookTestUtil()
>       assert facebook_test_util.check_whether_message_is_published(message, image_url)
E       AssertionError: assert False
E        +  where False = <bound method FacebookTestUtil.check_whether_message_is_published of <tests.test_views.FacebookTestUtil object at 0x3ecd759eb860>>('Assessment completed FACEBOOK CLI module! @ 2020-05-09 07:46:58.988379', 'https://hebbarskitchen.com/wp-content/uploads/2019/05/gadbad-ice-cream-recipe-gudbud-ice-cream-gadi-badi-ice-cream-2-1920x1280.jpeg')
E        +    where <bound method FacebookTestUtil.check_whether_message_is_published of <tests.test_views.FacebookTestUtil object at 0x3ecd759eb860>> = <tests.test_views.FacebookTestUtil object at 0x3ecd759eb860>.check_whether_message_is_published

tests/test_views.py:119: AssertionError
----------------------------- Captured stdout call -----------------------------
Assessment completed FACEBOOK CLI module! @ 2020-05-09 07:46:58.988379
{'error': {'message': 'Missing or invalid image file', 'type': 'OAuthException', 'code': 324, 'error_subcode': 2069019, 'is_transient': False, 'error_user_title': 'Image required', 'error_user_msg': 'Make sure that your Page post includes an image that can be used in an ad.', 'fbtrace_id': 'AVi6Qobstl9xAWX15W_2W-R'}}
400
Get user feed url =  https://graph.facebook.com/107666304117855/feed?access_token=EAAImGMnPbSkBAJSVul7i2ttmQORoGk8FLnPt4eHZCE52BKVXdg5ZB7Q1vUnYO7BUd4OZBfGXGj9ipRUpnMCjfZAIctG2HqXE0p4NI6Oa6UiSSA3ZA7xRGNICo8tTiSycZCm249QwxAZCllLXZAEXsSKe9a6hUvoLQdZCKBq4plLsZAbJPmK8RaFF1R&fields=id,message,attachments
=============================== warnings summary ===============================
/usr/local/lib/python3.6/dist-packages/_pytest/junitxml.py:436
  /usr/local/lib/python3.6/dist-packages/_pytest/junitxml.py:436: 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: https://docs.pytest.org/en/latest/warnings.html
- generated xml file: /p-harikesh409-ME_QEATS_REVIEW_MP-3b92c9d0-91c9-11ea-8aa9-bd0f2a7a7808/p-harikesh409-ME_QEATS_REVIEW_MP/tests.xml -
=================== 1 failed, 1 passed, 1 warning in 17.23s ====================

2020-05-09 07:47:15,921 unitTesting  INFO     Pytest run complete
2020-05-09 07:47:15,925 unitTesting  INFO     Report generated: {'tests.test_views.TestSocialSharing.test_post_to_facebook_share': 'TEST_STATUS_SUCCESS', 'tests.test_views.TestSocialSharing.test_post_to_facebook_share_cli': 'TEST_STATUS_FAILURE'}

Hi @harikesh
Looks like you are facing challenges in the current module.

Below is a link to all the FAQ’s for the current module

Below are a few similar topics raised by other users which you might find usefull

Note - This is a BETA Feature,if you find this helpful, kindly let us know.
Feedback link - https://forms.gle/cmxN5pdTXgnwgC986

Kindly mark this as a solution if this has helped you solve your query

I did a git force-push and now it is working didn’t change anything in the code.

Closing this topic as it has been solved by you yourself. Great job, keep working hard. if its not resolved feel free to un-mark the accepted solution to re-open the topic.