Added external usage documentation links.

Changed abstract factory register method to take in a factory isntance as an argument as opposed to a factory class.
This commit is contained in:
tylerlaberge
2016-08-28 14:25:13 -04:00
parent e02d089b37
commit b3ca14d1df
3 changed files with 15 additions and 15 deletions

View File

@@ -79,8 +79,8 @@ class AbstractFactoryTestCase(TestCase):
class AnimalFactory(AbstractFactory):
def __init__(self):
super().__init__()
self._register('cat', CatFactory)
self._register('dog', DogFactory)
self._register('cat', CatFactory())
self._register('dog', DogFactory())
def create(self, animal_type):
return self._factories[animal_type].create()