Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test dependencies #449

Merged
merged 7 commits into from
Mar 28, 2024
Merged

Update test dependencies #449

merged 7 commits into from
Mar 28, 2024

Conversation

Alopalao
Copy link

Closes #441

Summary

Updated test dependencies
Depends in kytos PR

Local Tests

Test by running with updated kytos

End-to-End Tests

TBA

db/models.py Outdated Show resolved Hide resolved
@viniarck viniarck self-requested a review March 20, 2024 12:41
Copy link
Member

@viniarck viniarck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done. LGTM. Leaving it pre-approved to land soon.

@viniarck viniarck self-requested a review March 20, 2024 13:47
@viniarck
Copy link
Member

@Alopalao, there's one unit test failing if you could look into it, seems like related to pydantic internal changes, as I merge the other PRs:

https://scrutinizer-ci.com/g/kytos-ng/mef_eline/inspections/58b3979f-6283-4772-88bf-cb5d7fdf8c98

FAILED tests/unit/test_controllers.py::TestControllers::test_update_evcs - TypeError: argument of type 'NoneType'
self = <build.tests.unit.test_controllers.TestControllers object at 0x7fb245411750>

    def test_update_evcs(self):
        """Test update_evcs"""
        evc2 = dict(self.evc_dict | {"id": "456"})
>       self.eline.update_evcs([self.evc_dict, evc2])

tests/unit/test_controllers.py:91: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/py311/lib/python3.11/site-packages/tenacity/__init__.py:289: in wrapped_f
    return self(f, *args, **kw)
.tox/py311/lib/python3.11/site-packages/tenacity/__init__.py:379: in __call__
    do = self.iter(retry_state=retry_state)
.tox/py311/lib/python3.11/site-packages/tenacity/__init__.py:314: in iter
    return fut.result()
../.pyenv/versions/3.11.8/lib/python3.11/concurrent/futures/_base.py:449: in result
    return self.__get_result()
../.pyenv/versions/3.11.8/lib/python3.11/concurrent/futures/_base.py:401: in __get_result
    raise self._exception
.tox/py311/lib/python3.11/site-packages/tenacity/__init__.py:382: in __call__
    result = fn(*args, **kwargs)
.tox/py311/src/kytos/kytos/core/retry.py:25: in decorated
    return func(*args, **kwargs)
controllers/__init__.py:139: in update_evcs
    ).dict(exclude_none=True)
.tox/py311/lib/python3.11/site-packages/pydantic/main.py:1025: in dict
    return self.model_dump(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = EVCBaseDoc(id='1234', inserted_at=None, updated_at=datetime.datetime(2024, 3, 28, 15, 9, 51, 221204), uni_a=UNIDoc(tag...None, sb_priority=None, service_level=0, circuit_scheduler=[], archived=False, metadata={}, active=False, enabled=True)
kwargs = {'by_alias': False, 'exclude': None, 'exclude_defaults': False, 'exclude_none': True, ...}
values = {'_id': '1234', 'active': False, 'archived': False, 'bandwidth': 0, ...}

    def model_dump(self, **kwargs) -> Dict:
        """Return a dictionary representation of the model"""
        values = super().model_dump(**kwargs)
        if "id" in values and values["id"]:
            values["_id"] = values["id"]
>       if "exclude" in kwargs and "_id" in kwargs["exclude"]:
E       TypeError: argument of type 'NoneType' is not iterable

.tox/py311/var/lib/kytos/napps/kytos/mef_eline/db/models.py:23: TypeError

@viniarck viniarck merged commit 2700e42 into master Mar 28, 2024
2 checks passed
@viniarck viniarck deleted the upgrade/python branch March 28, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore: Update dependencies
2 participants