def test_assign_signature_block_no_authors(self):
     """Test that assign_signature_block behaves on no authors."""
     sample_record = {
         "authors": {}
     }
     assign_signature_block(recid=1, json=sample_record)
     assert len(sample_record['authors']) == 0
 def test_assign_signature_block_malformed(self):
     """Test that assign_signature_block adds signature_block."""
     sample_record = {
         "authors": [{
             "full_name": ", "
         }]
     }
     assign_signature_block(recid=1, json=sample_record)
     assert 'signature_block' not in sample_record['authors'][0]
 def test_assign_signature_block_addition(self):
     """Test that assign_signature_block adds signature_block."""
     sample_record = {
         "authors": [{
             "full_name": "John Ellis"
         }]
     }
     assign_signature_block(recid=1, json=sample_record)
     assert 'signature_block' in sample_record['authors'][0]
 def test_assign_signature_block_empty(self):
     """Test that assign_signature_block behaves on empty records."""
     sample_record = {}
     assign_signature_block(recid=1, json=sample_record)
     assert sample_record == {}