learningequality / kolibri

Kolibri Learning Platform: the offline app for universal education
https://learningequality.org/kolibri/
MIT License
804 stars 668 forks source link

Replace content app test fixtures #3523

Open ralphiee22 opened 6 years ago

ralphiee22 commented 6 years ago

Observed behavior

Right now in the content app, we load fixtures to use in our tests. These fixtures don't have meaningful names or attributes. Such as "title": "c2" or "title": "c1c2". Also we have relations that won't normally happen in an actual content database, such as a topic node having an audio node parent. This makes it difficult to add new tests or add/modify fixtures. It was suggested to create a channel on studio, in which we could dump the data into a fixtures file to use for our tests. In this way, we are testing a true content database schema, with meaningful names and relations.

Note: Since we currently test and have fixtures for each schema of an importable content database into kolibri, we would need to change the json fixtures for each of these schemas.

Expected behavior

Easy to add new tests and reason about tests in PRs.

DEV-facing consequences

Difficult to reason through tests, and find matching object fixtures, to the implemented tests.

rtibbles commented 6 years ago

Note: I have already done some updates to the content import fixtures (and will continue to do so) because they were not representative of data coming from a content database.