class TestABCSample(unittest.TestCase): def setUp(self): self.sample = Sample(project_id="project", sample_id="sample", sample_prefix="project/sample/sample", project_prefix="project", sample_run_prefix="project/sample/samplerun/samplerun") def test_sample(self): self.assertEqual(self.sample.prefix(), "project/sample/sample") self.assertEqual(self.sample.path(), "project/sample") self.assertEqual(self.sample.prefix("project"), "project") self.assertEqual(self.sample.path("project"), ".") self.assertEqual(self.sample.prefix("sample_run"), "project/sample/samplerun/samplerun") self.assertEqual(self.sample.path("sample_run"), "project/sample/samplerun") self.assertEqual(self.sample.project_id(), "project")
class TestABCSample(unittest.TestCase): def setUp(self): self.sample = Sample( project_id="project", sample_id="sample", sample_prefix="project/sample/sample", project_prefix="project", sample_run_prefix="project/sample/samplerun/samplerun") def test_sample(self): self.assertEqual(self.sample.prefix(), "project/sample/sample") self.assertEqual(self.sample.path(), "project/sample") self.assertEqual(self.sample.prefix("project"), "project") self.assertEqual(self.sample.path("project"), ".") self.assertEqual(self.sample.prefix("sample_run"), "project/sample/samplerun/samplerun") self.assertEqual(self.sample.path("sample_run"), "project/sample/samplerun") self.assertEqual(self.sample.project_id(), "project")