def test_extended_generics(self):
        # New gereic resolvers were defined.
        self.assertEqual(api.freecall("attribute-resolver", "f**k you sir, you are shallow and pedantic", "countyou"), 2)

        # Here you see how the newly defined resolvers override the
        # old ones. (the old one would have found the nearest
        # swearwords)
        self.assertEqual(api.freecall("attribute-resolver", "f**k you sir, you are shallow and pedantic countyou", "countyou"), 2)
 def test_extended_statics(self):
     # New static attribute resolvers were defined here.
     self.assertEqual(api.freecall("attribute-resolver", "f**k you sir, you are shallow and pedantic", "wordcount"), 8)
 def test_swearwords(self):
     # Resolution of static attributes will fail on attribute "on"
     # (only "yomama" static attribute is available) and will
     # fallback to resolving using 'nearby_swearwords'
     self.assertEqual(api.freecall("attribute-resolver", "shit is on me shoes", "on"), ['shit'])
 def test_extended_swearwords(self):
     # This should match the old swear words and some extra
     api.append('swearwords', "pedantic")
     api.set('nearby-word-distance', 5)
     self.assertEqual(api.freecall("attribute-resolver", "f**k you sir, you are shallow and pedantic", "are"), ['f**k', 'pedantic'])
 def test_yomama(self):
     self.assertEqual(api.freecall("attribute-resolver", "be-fat", "yomama"), 'yomama be-fat')
 def test_basics(self):
     self.assertEqual(api.freecall("frontend", "(mysplit \"1 2 3\")"),
                      ['1', '2', '3'])
 def test_calling(self):
     self.assertEqual(api.call("member"), 2)
     self.assertEqual(api.freecall("test-frontend", "a string to split"),
                      ['a', 'string', 'to', 'split'])
 def test_basics(self):
     self.assertEqual(api.freecall("frontend", "(mysplit \"1 2 3\")"),
                      ['1', '2', '3'])
 def test_calling(self):
     self.assertEqual(api.call("member"), 2)
     self.assertEqual(api.freecall("test-frontend", "a string to split"),
                      ['a', 'string', 'to', 'split'])