def test_refresh_from_sets_all_values_to_object(self):
        obj = TwitchObject()
        obj.refresh_from({'spongebob': 'squarepants', 'patrick': 'star', '_id': 1234})

        assert obj.spongebob == 'squarepants'
        assert obj['patrick'] == 'star'
        assert obj.id == 1234
Exemple #2
0
    def test_refresh_from_sets_all_values_to_object(self):
        obj = TwitchObject()
        obj.refresh_from({
            "spongebob": "squarepants",
            "patrick": "star",
            "_id": 1234
        })

        assert obj.spongebob == "squarepants"
        assert obj["patrick"] == "star"
        assert obj.id == 1234