1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Play.get_name: remove prefix, return name only

This commit is contained in:
Pierre-Louis Bonicoli 2015-07-02 16:11:56 +02:00
parent fda8fa77ab
commit 8c392a94b7
2 changed files with 2 additions and 2 deletions

View file

@ -95,7 +95,7 @@ class Play(Base, Taggable, Become):
def get_name(self): def get_name(self):
''' return the name of the Play ''' ''' return the name of the Play '''
return "PLAY: %s" % self._attributes.get('name') return self._attributes.get('name')
@staticmethod @staticmethod
def load(data, variable_manager=None, loader=None): def load(data, variable_manager=None, loader=None):

View file

@ -39,7 +39,7 @@ class TestPlay(unittest.TestCase):
def test_empty_play(self): def test_empty_play(self):
p = Play.load(dict()) p = Play.load(dict())
self.assertEqual(str(p), "PLAY: ") self.assertEqual(str(p), '')
def test_basic_play(self): def test_basic_play(self):
p = Play.load(dict( p = Play.load(dict(