title: Hard time debugging AttributeError: module 'game' has no attribute 'get_player_names'
body: <p>I'm really trying hard to implement mock objects in a test-driven basic dice game. However, when I run my test (see below) it displays "AttributeError" and I'm just not seeing why?</p>
  
  <p>This is my unittest (<code>test_game.py</code>) implementation:</p>
  
  <pre><code>from unittest import TestCase, mock
  
  import game
  
  class GameTest(TestCase):
  
      def test_get_player_names(self):
          """Players can enter their names"""
  
          fake_input = mock.Mock(side_effect=['A', 'M', 'Z', ''])
  
          with mock.patch('builtins.input', fake_input):
              names = game.get_player_names()
  
          self.assertEqual(names, ['A', 'M', 'Z'])
  
      def test_get_player_names_stdout(self):
          """Check the prompts for player names"""
  
          with mock.patch('builtins.input', side_effect=['A', 'B', '']) as fake:
              game.get_player_names()
  
          fake.assert_has_calls([
              mock.call("Player 1's name: "),
              mock.call("Player 2's name: "),
              mock.call("Player 3's name: ")
          ])
  </code></pre>
  
  <p>This is my actual code (<code>game.py</code>) in Python:</p>
  
  <pre><code>class Dice:
  
      def __init__(self, *players):
          self.players = players
  
      def get_players(self):
          """Return a tuple of all players"""
          return self.players
  
      def get_player_names():
          """Prompt for player names"""
          names = []
  
          while True:
              value = input("Player {}'s name: ".format(len(names) + 1))
              if not value:
                  break
  
              names.append(value)
  
          return names
  </code></pre>
  
  <p>Error Display for Tests (PowerShell):</p>
  
  <pre>PS C:\Users\Seun\desktop\dice> python -m unittest
  
  ----------------------------------------------------------------------
  Ran 0 tests in 0.000s
  
  OK
  PS C:\Users\Seun\desktop\dice> python3 -m unittest
  EE.
  ======================================================================
  ERROR: test_get_player_names (test_game.GameTest)
  Players can enter their names
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "C:\Users\Seun\desktop\dice\test_game.py", line 19, in test_get_player_names
      names = game.get_player_names()
  AttributeError: module 'game' has no attribute 'get_player_names'
  
  ======================================================================
  ERROR: test_get_player_names_stdout (test_game.GameTest)
  Check the prompts for player names
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "C:\Users\Seun\desktop\dice\test_game.py", line 27, in test_get_player_names_stdout
      game.get_player_names()
  AttributeError: module 'game' has no attribute 'get_player_names'
  
  ----------------------------------------------------------------------
  Ran 3 tests in 0.009s
  
  FAILED (errors=2)</pre>