def test_deepcopy_subset(adata, spmat: type):
    adata.obsp["arr"] = np.zeros((adata.n_obs, adata.n_obs))
    adata.obsp["spmat"] = spmat((adata.n_obs, adata.n_obs))

    adata = deepcopy(adata[:10].copy())

    assert isinstance(adata.obsp["arr"], np.ndarray)
    assert not isinstance(adata.obsp["arr"], ArrayView)
    np.testing.assert_array_equal(adata.obsp["arr"].shape, (10, 10))

    assert isinstance(adata.obsp["spmat"], spmat)
    assert not isinstance(
        adata.obsp["spmat"],
        SparseCSRView if spmat is sparse.csr_matrix else SparseCSCView,
    )
    np.testing.assert_array_equal(adata.obsp["spmat"].shape, (10, 10))
def test_to_dict_returns_correct_dict(self):
        self.voiceover_application.accept(self.reviewer_id)
        expected_dict = {
            'voiceover_application_id': 'application_id',
            'target_type': 'exploration',
            'target_id': 'exp_id',
            'status': 'accepted',
            'author_name': 'author',
            'final_reviewer_name': 'reviewer',
            'language_code': 'en',
            'content': '<p>Content</p>',
            'filename': 'audio_file.mp3',
            'rejection_message': None
        }
        self.assertEqual(
            self.voiceover_application.to_dict(), expected_dict)