Newly tracked file
mep/books/tests/test_books_commands.py
changed.
Newly tracked file
mep/books/management/commands/export_books.py
changed.
404 | 404 | # fixture has no events for exit eliza, so no years are set |
|
405 | 405 | assert data['circulation_years'] == [] |
|
406 | 406 | ||
407 | - | # infer format = book if format is unset and item not uncertain |
|
408 | - | exit_e.work_format = None |
|
409 | - | assert self.cmd.get_object_data(exit_e)['format'] == 'Book' |
|
410 | - | exit_e.notes = 'UNCERTAINTYICON' |
|
411 | - | assert 'format' not in self.cmd.get_object_data(exit_e) |
|
412 | - | ||
413 | 407 | # record with different data |
|
414 | 408 | dial = Work.objects.count_events().get(slug='dial') |
|
415 | 409 | data = self.cmd.get_object_data(dial) |
73 | 73 | # format is not currently set for all items |
|
74 | 74 | if work.work_format: |
|
75 | 75 | data['format'] = work.work_format.name |
|
76 | - | elif 'UNCERTAINTYICON' not in work.notes: |
|
77 | - | # if format is blank and item is NOT unidentified, default to Book |
|
78 | - | data['format'] = 'Book' |
|
79 | 76 | ||
80 | 77 | data['uncertain'] = work.is_uncertain |
|
81 | 78 |
Files | Coverage |
---|---|
mep | 98.44% |
srcmedia/ts | 86.55% |
Project Totals (223 files) | 98.00% |
TRAVIS_PYTHON_VERSION=3.5 TRAVIS_OS_NAME=linux