Module 3 Milestone 2 Qeats sneak peek

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

def test_tag_suggesstion(self):
    prefix = os.getenv('USER_SOLUTION')
    if prefix is None:
        prefix = '.'

    image_path = prefix + '/tests/biryani.jpeg'
    if prefix is None:
        prefix = '.'
    img_b64 = restaurants.image_uploader.file_path_to_img64(image_path)

    body = {
            'imgBase64' : img_b64.decode('utf-8')
    client = Client()

    resp ='/qeats/v1/tags', data=json.dumps(body), content_type='application/json')
    assert resp.status_code == 200
    actual_tag_suggesstion_received = json.loads(resp.content)
    expected_tag_suggestion = ['rice', 'meat', 'vegetable', 'paella', 'chicken', 'pilaf', 'pepper', 'saffron', 'pork', 'fried rice', 'curry', 'shrimp', 'risotto', 'seafood', 'sauce', 'onion', 'chili', 'chicken curry', 'prawn', 'cereal']

    assert type(actual_tag_suggesstion_received) == type([])
  assert expected_tag_suggestion[0:3] == actual_tag_suggesstion_received[0:3]

E AssertionError: assert [‘rice’, ‘meat’, ‘vegetable’] == []
E Left contains 3 more items, first extra item: ‘rice’
E Use -v to get the full diff

tests/ AssertionError

Can somebody help me here!

Hi @Shaharyaar
Looks like you are facing challenges in 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 -

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

Can you refer to this

Closing this topic as your issue is resolved by the mentor. If it is still not resolved, Kindly un-mark the accepted solution or create a new topic and post this question as a reference link in the description of the new topic.