prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  test_multiple_heads is not raising the expected error
  **Describe the bug**
  <!-- A clear and concise description of what the bug is. -->
  On having multiple heads, the travis build fails with error -
  ```
  error: Hooks handler process 'dredd-hooks-python ./tests/hook_main.py' exited with status: 1
  warn: Hook handling timed out.
  error: Hooks handler process 'dredd-hooks-python ./tests/hook_main.py' exited with status: 1
  info: Backend server process exited
  The command "dredd" failed and exited with 1 during .
  ```
  It should raise error as expected in - https://github.com/fossasia/open-event-server/blob/development/scripts/test_multiple_heads.sh
  
  **Expected behavior**
  <!-- A clear and concise description of what you expected to happen. -->
  Expected error should be raised - `Error: Multiple Migration Heads`
  
  <!-- If applicable, add stacktrace to help explain your problem. -->
  
  
  **Additional context**
  <!-- Add any other context about the problem here. -->
  On it
  
  </issue>
  <code>
  [start of migrations/versions/rev-2021-01-07-05:19:49-3b29ea38f0cb_.py]
  1 """empty message
  2 
  3 Revision ID: 3b29ea38f0cb
  4 Revises: 2d0760003a8a
  5 Create Date: 2021-01-07 05:19:49.749923
  6 
  7 """
  8 
  9 from alembic import op
  10 import sqlalchemy as sa
  11 import sqlalchemy_utils
  12 
  13 
  14 # revision identifiers, used by Alembic.
  15 revision = '3b29ea38f0cb'
  16 down_revision = '2d0760003a8a'
  17 
  18 
  19 def upgrade():
  20     # ### commands auto generated by Alembic - please adjust! ###
  21     op.add_column('speaker', sa.Column('rank', sa.Integer(), nullable=False, server_default='0'))
  22     # ### end Alembic commands ###
  23 
  24 
  25 def downgrade():
  26     # ### commands auto generated by Alembic - please adjust! ###
  27     op.drop_column('speaker', 'rank')
  28     # ### end Alembic commands ###
  29
  [end of migrations/versions/rev-2021-01-07-05:19:49-3b29ea38f0cb_.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/migrations/versions/rev-2021-01-07-05:19:49-3b29ea38f0cb_.py b/migrations/versions/rev-2021-01-07-05:19:49-3b29ea38f0cb_.py
  --- a/migrations/versions/rev-2021-01-07-05:19:49-3b29ea38f0cb_.py
  +++ b/migrations/versions/rev-2021-01-07-05:19:49-3b29ea38f0cb_.py
  @@ -13,7 +13,7 @@
   
   # revision identifiers, used by Alembic.
   revision = '3b29ea38f0cb'
  -down_revision = '2d0760003a8a'
  +down_revision = '4e61d4df3516'
   
   
   def upgrade():
  
verification_info: {"golden_diff": "diff --git a/migrations/versions/rev-2021-01-07-05:19:49-3b29ea38f0cb_.py b/migrations/versions/rev-2021-01-07-05:19:49-3b29ea38f0cb_.py\n--- a/migrations/versions/rev-2021-01-07-05:19:49-3b29ea38f0cb_.py\n+++ b/migrations/versions/rev-2021-01-07-05:19:49-3b29ea38f0cb_.py\n@@ -13,7 +13,7 @@\n \n # revision identifiers, used by Alembic.\n revision = '3b29ea38f0cb'\n-down_revision = '2d0760003a8a'\n+down_revision = '4e61d4df3516'\n \n \n def upgrade():\n", "issue": "test_multiple_heads is not raising the expected error\n**Describe the bug**\r\n<!-- A clear and concise description of what the bug is. -->\r\nOn having multiple heads, the travis build fails with error -\r\n```\r\nerror: Hooks handler process 'dredd-hooks-python ./tests/hook_main.py' exited with status: 1\r\nwarn: Hook handling timed out.\r\nerror: Hooks handler process 'dredd-hooks-python ./tests/hook_main.py' exited with status: 1\r\ninfo: Backend server process exited\r\nThe command \"dredd\" failed and exited with 1 during .\r\n```\r\nIt should raise error as expected in - https://github.com/fossasia/open-event-server/blob/development/scripts/test_multiple_heads.sh\r\n\r\n**Expected behavior**\r\n<!-- A clear and concise description of what you expected to happen. -->\r\nExpected error should be raised - `Error: Multiple Migration Heads`\r\n\r\n<!-- If applicable, add stacktrace to help explain your problem. -->\r\n\r\n\r\n**Additional context**\r\n<!-- Add any other context about the problem here. -->\r\nOn it\n", "before_files": [{"content": "\"\"\"empty message\n\nRevision ID: 3b29ea38f0cb\nRevises: 2d0760003a8a\nCreate Date: 2021-01-07 05:19:49.749923\n\n\"\"\"\n\nfrom alembic import op\nimport sqlalchemy as sa\nimport sqlalchemy_utils\n\n\n# revision identifiers, used by Alembic.\nrevision = '3b29ea38f0cb'\ndown_revision = '2d0760003a8a'\n\n\ndef upgrade():\n    # ### commands auto generated by Alembic - please adjust! ###\n    op.add_column('speaker', sa.Column('rank', sa.Integer(), nullable=False, server_default='0'))\n    # ### end Alembic commands ###\n\n\ndef downgrade():\n    # ### commands auto generated by Alembic - please adjust! ###\n    op.drop_column('speaker', 'rank')\n    # ### end Alembic commands ###\n", "path": "migrations/versions/rev-2021-01-07-05:19:49-3b29ea38f0cb_.py"}]}