def test_06_known_all_plugins(self):
     invalidate.invalidate_license("cc0", handler="plugin_b", handler_version="2.0", reporter=invalidate.stdout_reporter)
     
     # 0, 13 should have no licence
     compare(["000", "131313"], 0)
     
     # 1 - 12, 21, 25 should have 1 licence
     compare(["111", "222", "333", "444", "555", "666", "777", "888", "999", "101010", "111111", "121212", "212121", "252525"], 1)
     
     # 14 - 20, 22 - 24 should still have two licences
     compare(["141414", "151515", "161616", "171717", "181818", "191919", "202020", "222222", "232323", "242424"], 2)
     
     # we should also find that the cache is empty for 13, 21, 25
     # and still there for 0 - 12, 14 - 20, 22 - 24
     cache_is_empty([13,21,25], [0,1,2,3,4,5,6,7,8,9,10,11,12,14,15,16,17,18,19,20,22,23,24])
 def test_04_known_all_plugins(self):
     # invalidate all failed-to-obtain-license licences, irrespective of version or plugin
     invalidate.invalidate_license("cc0", reporter=invalidate.stdout_reporter)
     
     # 0, and 10 - 13 should have no licence
     compare(["000", "101010", "111111", "121212", "131313"], 0)
     
     # 2 - 9, 19, 21, 23, 25 should have 1 licence
     compare(["111", "222", "333", "444", "555", "666", "777", "888", "999", "191919", "212121", "232323", "252525"], 1)
     
     # 14 - 18, 20, 22, 24 should still have two licences
     compare(["141414", "151515", "161616", "171717", "181818", "202020", "222222", "242424"], 2)
     
     # we should also find that the cache is empty for 10 - 13, 19, 21, 23, 25
     # and still there for 0 - 9, 14 - 18, 20, 22, 24
     cache_is_empty([10,11,12,13,19,21,23,25], [0,1,2,3,4,5,6,7,8,9,14,15,16,17,18,20,22,24])
 def test_03_unknown_one_plugin_one_version(self):
     # invalidate all failed-to-obtain-license licences, irrespective of version or plugin
     invalidate.invalidate_license("failed-to-obtain-license", handler="plugin_a", handler_version="1.0", reporter=invalidate.stdout_reporter)
     
     # 0 - 1 should have no licence
     compare(["000", "111"], 0)
     
     # 2 - 13, 18, 19 should have 1 licence
     compare(["222", "333", "444", "555", "666", "777", "888", "999", "101010", "111111", "121212", "131313", "181818", "191919"], 1)
     
     # 14 - 17, 20 - 25 should still have two licences
     compare(["141414", "151515", "161616", "171717", "202020", "212121", "222222", "232323", "242424", "252525"], 2)
     
     # we should also find that the cache is empty for 1, 18, 19
     # and still there for 0, 2 - 17, 20 - 25
     cache_is_empty([1,18,19], [0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,20,21,22,23,24,25])
 def test_07_unknown_no_plugins(self):
     # invalidate all failed-to-obtain-license licences, irrespective of version or plugin
     invalidate.invalidate_license("failed-to-obtain-license", treat_none_as_missing=True, reporter=invalidate.stdout_reporter)
     
     one = models.Record.pull("111")
     two = models.Record.pull("222")
     three = models.Record.pull("333")
     four = models.Record.pull("444")
     five = models.Record.pull("555")
     six = models.Record.pull("666")
     seven = models.Record.pull("777")
     eight = models.Record.pull("888")
     
     assert len(one.data['license']) == 2
     assert len(two.data['license']) == 1
     assert len(three.data['license']) == 2
     assert len(four.data['license']) == 1
     assert len(five.data['license']) == 1
     assert len(six.data['license']) == 1
     assert len(seven.data['license']) == 1
     assert len(eight.data['license']) == 1
 def test_06_known_all_plugins(self):
     # invalidate all failed-to-obtain-license licences, irrespective of version or plugin
     invalidate.invalidate_license("cc0", handler="plugin_b", handler_version="1.1", reporter=invalidate.stdout_reporter)
     
     one = models.Record.pull("111")
     two = models.Record.pull("222")
     three = models.Record.pull("333")
     four = models.Record.pull("444")
     five = models.Record.pull("555")
     six = models.Record.pull("666")
     seven = models.Record.pull("777")
     eight = models.Record.pull("888")
     
     assert len(one.data['license']) == 2
     assert len(two.data['license']) == 2
     assert len(three.data['license']) == 2
     assert len(four.data['license']) == 1
     assert len(five.data['license']) == 1
     assert len(six.data['license']) == 1
     assert len(seven.data['license']) == 1
     assert len(eight.data['license']) == 0