"""Unit tests for util module.""" import pytest from tests import conftest @pytest.mark.parametrize( 'model, expected_dict, hash_key_name', [ (conftest.streams_vendor_totals_model(), conftest.streams_vendor_totals_dict(), 'vendor_key'), (conftest.streams_track_totals_model(), conftest.streams_track_totals_dict(), 'vendor_track_key') ] ) def test_as_dict_model_mixin( model, expected_dict, hash_key_name): """Test for converting Pynamodb model to python dict.""" assert model.as_dict() == expected_dict assert model.hash_key_name == hash_key_name assert model.range_key_name == 'date'