FidelityInternational / djangocms-pageadmin

BSD 3-Clause "New" or "Revised" License
1 stars 14 forks source link

Import instead of copy factories #31

Open jonathan-s opened 5 years ago

jonathan-s commented 5 years ago

@Aiky30 Perhaps we could import the factories we need from djangocms-versioning instead copy and paste them?

jonathan-s commented 5 years ago

@Aiky30 As a precedent, this is what djangocms-moderation does: https://github.com/divio/djangocms-moderation/blob/release/1.0.x/tests/utils/factories.py#L9-L12

stuaxo commented 4 years ago

Having the factories in test_utils, outside of the tests hierarchy is a good signal that they can be used elsewhere.

Aiky30 commented 4 years ago

@jonathan-s @stuaxo The main issue that was introduced in Versioning a long time ago was the dependence on the Versioning mocked apps, when I raised this with the author (Monika) she didn't want the factories reused and stated that you should create you're on in the apps. I would prefer to reuse them too but she made a good argument at the time.

Internal dependency: