Commit Graph

41 Commits

Author SHA1 Message Date
Stein Magnus Jodal
8c6f04a408 models: Change serialized type marker from '__type__' to '__model__' 2012-11-20 00:21:26 +01:00
Stein Magnus Jodal
693a3d3ec6 models: Model creation with kwarg matching method name should fail 2012-11-19 23:58:16 +01:00
Stein Magnus Jodal
34d444e563 models: Don't allow model deserialization to override methods 2012-11-19 23:35:05 +01:00
Stein Magnus Jodal
3bc4126b45 models: Fix TlTrack deserialization 2012-11-18 17:28:37 +01:00
Stein Magnus Jodal
68e4b207cb models: Support automatic serialization to and deserialization from JSON 2012-11-18 16:53:26 +01:00
Stein Magnus Jodal
f237736f87 models: Add '__type__' attribute to serialized models 2012-11-18 16:53:09 +01:00
Stein Magnus Jodal
74a6589668 tests: Fix typo in class name 2012-11-18 16:51:33 +01:00
Stein Magnus Jodal
87ba412942 models: Make TlTrack an ImmutableObject 2012-11-16 15:01:37 +01:00
Stein Magnus Jodal
bba9548b27 Rename 'current playlist' to 'tracklist' 2012-11-13 10:59:48 +01:00
Stein Magnus Jodal
6acaa490e9 Make all strings unicode by default (fixes #224) 2012-11-13 00:18:47 +01:00
Stein Magnus Jodal
d60bb57f5f Test new Album.date attribute 2012-10-30 10:18:40 +01:00
Stein Magnus Jodal
ac60bcdf8e Fix all flake8 warnings in tests (#211) 2012-10-16 14:43:31 +02:00
Stein Magnus Jodal
a8d1d41ab3 Use assertIn and assertNotIn in tests 2012-09-15 17:46:25 +02:00
Stein Magnus Jodal
7525cad94c Let Track.date be an ISO-8601 string
This lets us have less precision than full dates. E.g. Spotify tracks only got
release year, not full release date.

The original MPD server regularly expose data like this as "Date: 1977", so we
don't need to fake more precision for MPD's sake.
2012-09-12 23:06:06 +02:00
Thomas Adamcik
6805c16b1a Add .serialize() method to ImutableObjects.
Should be useful for things like dumping to json.
2012-09-05 23:54:37 +02:00
Thomas Adamcik
1985b4af76 Switch all tests over to from tests import unittest, which will be unittest2 on < 2.7 and plain unittest otherwise 2011-07-31 22:21:34 +02:00
Stein Magnus Jodal
3f97f3f78b Convert cp_track from tuple to namedtuple, to get more readable code 2011-06-04 20:46:34 +02:00
Stein Magnus Jodal
ba738b5c1e Add missing tests for eq/ne of Playlist 2011-04-06 18:36:14 +02:00
Stein Magnus Jodal
005260eb9c Add __repr__ to ImmutableObject to get better output from failed model comparisions in tests 2011-04-06 18:18:00 +02:00
Stein Magnus Jodal
037da6f460 Remove Playlist._tracks workaround 2011-04-06 18:01:33 +02:00
Stein Magnus Jodal
fce5964395 Remove Track._artists workaround 2011-04-06 17:54:12 +02:00
Stein Magnus Jodal
9499250a7f Remove Album._artists workaround 2011-04-06 17:51:36 +02:00
Stein Magnus Jodal
c097af1a83 Fix a bunch of pylint errors/warnings in test suite 2011-01-23 18:39:05 +01:00
Thomas Adamcik
edb2f060c4 Add musicbrainz to models 2010-11-02 00:36:01 +01:00
Thomas Adamcik
d05e48c439 Add generic copy method to models (including tests) 2010-11-02 00:35:27 +01:00
Thomas Adamcik
913bac3b0d Rename with_ to copy 2010-11-01 00:56:06 +01:00
Stein Magnus Jodal
96ac806d8f Remove Track.id field 2010-08-08 17:17:38 +02:00
Stein Magnus Jodal
dd494107d3 Extract mpd_format from models to mopidy.mpd.serializers 2010-07-01 00:39:50 +02:00
Thomas Adamcik
d873fd62de pylint tests written for gstreamer 2010-05-01 21:53:52 +02:00
Thomas Adamcik
0553c804f2 Fix trailing whitespace 2010-04-29 21:59:52 +02:00
Thomas Adamcik
1da9dced77 Ensure that models don't accept unknown kwarg keys 2010-04-29 21:09:17 +02:00
Thomas Adamcik
853af8a492 Add fixme and test stub for playlist eq and hash testing 2010-04-28 22:09:30 +02:00
Thomas Adamcik
db4ad72678 Fix test_artists test with respect to hashing and set behaveviour 2010-04-28 21:53:51 +02:00
Thomas Adamcik
64f81a6594 Add test_eq_other check 2010-04-28 21:51:19 +02:00
Thomas Adamcik
1d3a394d03 «Hashable objects which compare equal must have the same hash value» ie. add hash tests for eq 2010-04-28 21:36:13 +02:00
Thomas Adamcik
69e6d5dc92 Add test for equality with ordering changes of artists 2010-04-27 23:25:35 +02:00
Thomas Adamcik
b24d883db9 Test comparing with None 2010-04-27 23:15:33 +02:00
Thomas Adamcik
f8b2d52333 Add __eq__ to Track 2010-04-27 23:12:24 +02:00
Thomas Adamcik
3bc795ee95 Add __eq__ to album 2010-04-27 22:55:36 +02:00
Thomas Adamcik
06d6fd81c7 Add __eq__ to Artist 2010-04-27 22:47:35 +02:00
Stein Magnus Jodal
fdf3d4f11b Replace CoverageTestRunner with nosetests 2010-03-23 23:54:49 +01:00