Commit Graph

9 Commits

Author SHA1 Message Date
Isaac Bythewood
a4f3adc2df Updated requirements and other items in preps of new pinry version 2013-09-22 03:33:50 +00:00
Krzysztof Klimonda
7db42bb075 Generate thumbnails when image is being saved
Too lax unique constraints for Thumbnail coped with "on demand" thumbnail
generation may leave database in inconsistent state where two thumbnail for
the same size are saved. We should be able to prevent that from happening
by generating all thumbnails when we save the image. Should fix #24, but
I can't figure out a way to actually test it.
2013-04-16 00:30:43 +02:00
Krzysztof Klimonda
3b10868832 Open binary files in the binary mode
Make sure that we are using binary mode to read binary files like images, this Fixes #20
2013-04-05 19:10:17 +02:00
Krzysztof Klimonda
e71452c68f Use a relative path for the test image
It's part of the issue #20 (weird path on Windows). Django File class used
a full file path which resulted in path like C:\Example\pinry\static\C:\... which
is obviously invalid.
2013-03-27 21:07:22 +01:00
Krzysztof Klimonda
26b6805b6f Replace screenshot.png with logo.png in tests 2013-03-05 01:32:57 -08:00
Krzysztof Klimonda
10c9b35700 Even though not used, import models for Factory Boy 2013-03-05 01:28:39 -08:00
Krzysztof Klimonda
26f9c76988 Don't use FACTORY_FOR when not needed 2013-03-04 15:33:09 -08:00
Krzysztof Klimonda
7a85f1b514 Use post_generation hooks to populate models with some data
Factory Boy provides us with a better way of populating complicated
fields (like M2M relations) than overriding _prepare class method,
so we should be using them.
2013-03-04 14:58:54 -08:00
Krzysztof Klimonda
ef818b7f82 Rewrite tests to use a Model mocker library
There has been issues when running a full test suite (for pinry and
the entire Django stack), and test fixtures are hard to maintain anyway,
so rewrite tests to use a Model mocker library (Factory Boy) to populate
database.
2013-03-04 12:06:00 -08:00