def test_make_effect_by_effect_name(self):
        effect_name = "Realm King"
        effect = self._make_effect(effect_name=effect_name)

        collection = EffectCollection()
        collection.add(effect)

        expected = effect

        # Typical use case
        actual = collection.get_effect_by_effect_name(effect_name=effect_name)

        self.assertEqual(len(collection.effects), 1)
        self.assertEqual(expected, actual)

        # Test that we don't get the wrong thing
        expected = None
        actual = collection.get_effect_by_effect_name(
            effect_name="hello world")
        self.assertEqual(expected, actual)
    def test_add_effect(self):
        effect_name = "Test Effect"
        effect_type = "rock"
        effect = self._make_effect(effect_name=effect_name)

        collection = EffectCollection()
        collection.add(effect)

        expected = effect
        actual = collection.get_effect_by_effect_name(effect_name=effect_name)

        self.assertEqual(len(collection.effects), 1)
        self.assertEqual(expected, actual)

        # Test that we can't add duplicate effects
        collection.add(effect)
        self.assertEqual(len(collection.effects), 1)