def test_target_info(self): target = ArchiveTarget(name='neon-archive') target.save() job = ArchiveJob() job.target_addons.append(target) result = job.target_info() assert_equal(len(result), 1) item = result[0] assert_equal(item['name'], target.name) assert_equal(item['status'], target.status) assert_equal(item['stat_result'], target.stat_result) assert_equal(item['errors'], target.errors)
def test_repr(self): target = ArchiveTarget() result = repr(target) assert_in('ArchiveTarget', result) assert_in(str(target._id), result)