test_renewable_remainder.py 986 B

1234567891011121314151617181920212223242526272829303132333435
  1. from yandex_music import RenewableRemainder
  2. class TestRenewableRemainder:
  3. days = 0
  4. def test_expected_values(self, renewable_remainder):
  5. assert renewable_remainder.days == self.days
  6. def test_de_json_none(self, client):
  7. assert RenewableRemainder.de_json({}, client) is None
  8. def test_de_json_required(self, client):
  9. json_dict = {'days': self.days}
  10. renewable_remainder = RenewableRemainder.de_json(json_dict, client)
  11. assert renewable_remainder.days == self.days
  12. def test_de_json_all(self, client):
  13. json_dict = {'days': self.days}
  14. renewable_remainder = RenewableRemainder.de_json(json_dict, client)
  15. assert renewable_remainder.days == self.days
  16. def test_equality(self):
  17. a = RenewableRemainder(self.days)
  18. b = RenewableRemainder(10)
  19. c = RenewableRemainder(self.days)
  20. assert a != b
  21. assert hash(a) != hash(b)
  22. assert a is not b
  23. assert a == c