class TestTargetExtractor(TestCase): def setUp(self): self.sut = TargetExtractor(re.compile(DEFAULT_FILE_REGEX)) def test_it_extracts_the_correct_strings_from_the_filename(self): self.assertEquals(("System", "App", "Model"), self.sut.extract("System_App_Model.csv")) self.assertEquals(("System", "App", "Model"), self.sut.extract("System_App_Model_1234.csv")) self.assertEquals(("ABCabc123", "App", "Model"), self.sut.extract("ABCabc123_App_Model.csv"))
class TestTargetExtractor(TestCase): def setUp(self): self.sut = TargetExtractor(re.compile(DEFAULT_FILE_REGEX)) def test_it_extracts_the_correct_strings_from_the_filename(self): self.assertEquals(('System', 'App', 'Model'), self.sut.extract('System_App_Model.csv')) self.assertEquals(('System', 'App', 'Model'), self.sut.extract('System_App_Model_1234.csv')) self.assertEquals(('ABCabc123', 'App', 'Model'), self.sut.extract('ABCabc123_App_Model.csv'))
def setUp(self): self.sut = TargetExtractor(re.compile(DEFAULT_FILE_REGEX))