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"))
예제 #2
0
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'))
예제 #3
0
 def setUp(self):
     self.sut = TargetExtractor(re.compile(DEFAULT_FILE_REGEX))
 def setUp(self):
     self.sut = TargetExtractor(re.compile(DEFAULT_FILE_REGEX))