import nose
from lib.wordfilter import Wordfilter

# Run with `python -m test.wordfilter_test`
class Wordfilter_test:
  def setup(self):
    self.wordfilter = Wordfilter()

  def teardown(self):
    self.wordfilter = []

  def test_loading(self):
    assert type(self.wordfilter.blacklist) is list

  def test_badWords(self):
    assert self.wordfilter.blacklisted('this string contains the word skank')
    assert self.wordfilter.blacklisted('this string contains the word SkAnK')
    assert self.wordfilter.blacklisted('this string contains the wordskank')
    assert self.wordfilter.blacklisted('this string contains the skankword')
    assert not self.wordfilter.blacklisted('this string is clean!')

  def test_addWords(self):
    self.wordfilter.addWords(['clean'])
    assert self.wordfilter.blacklisted('this string contains the word skank')
    assert self.wordfilter.blacklisted('this string is clean!')

  def test_clearList(self):
    self.wordfilter.clearList();
    assert not self.wordfilter.blacklisted('this string contains the word skank')

    self.wordfilter.addWords(['skank'])
    assert self.wordfilter.blacklisted('this string contains the word skank')

if __name__ == "__main__":
  nose.main()

@@ -971,10 +971,9 @@
 st()
-;
 %0A
+
     
@@ -1087,24 +1087,24 @@
 (%5B'skank'%5D)%0A
-
     assert s
@@ -1170,16 +1170,395 @@
 kank')%0A%0A
+  def test_add_multiple_words(self):%0A    # Arrange%0A    self.wordfilter.clearList()%0A%0A    # Act%0A    self.wordfilter.addWords(%5B'zebra','elephant'%5D)%0A%0A    # Assert%0A    assert self.wordfilter.blacklisted('this string has zebra in it')%0A    assert self.wordfilter.blacklisted('this string has elephant in it')%0A    assert not self.wordfilter.blacklisted('this string has nothing in it')%0A%0A
 if __nam

Add another test case - add multiple words