'Test adding new cards and updating existing cards from a dict using
Header.update()'

def test_update_from_dict(self):

    header = fits.Header([('A', 'B'), ('C', 'D')])
    header.update({'A': 'E', 'F': 'G'})
    assert (header['A'] == 'E')
    assert (header[0] == 'E')
    assert ('F' in header)
    assert (header['F'] == 'G')
    assert (header[(-1)] == 'G')
    header = fits.Header([('A', 'B'), ('C', 'D')])
    header.update(A='E', F='G')
    assert (header['A'] == 'E')
    assert (header[0] == 'E')
    assert ('F' in header)
    assert (header['F'] == 'G')
    assert (header[(-1)] == 'G')
