def test_create_and_cache(self):
    base_dir = app.config['BASEDIR']
    (whisky_1, whisky_2) = self.test_suite.get_whiskies()
    chart = Chart(reference=whisky_1, comparison=whisky_2)
    contents = chart.create()
    cached = chart.cache()
    sample = base_dir.child('whiskyton', 'tests', 'chart_sample.svg')
    self.assertEqual(contents, cached.read_file())
    self.assertEqual(contents, sample.read_file())
def test_create_and_cache(self):
    base_dir = app.config['BASEDIR']
    (whisky_1, whisky_2) = self.test_suite.get_whiskies()
    chart = Chart(reference=whisky_1, comparison=whisky_2)
    contents = chart.create()
    cached = chart.cache()
    sample = base_dir.child('whiskyton', 'tests', 'chart_sample.svg')
    self.assertEqual(contents, cached.read_file())
    self.assertEqual(contents, sample.read_file())