Ejemplo n.º 1
0
    def test_current_party_is_considered(self):
        snippet_info2014_version = self.create_snippet_with_version(self.party2014, 'info', '2014-10-23 14:55:00')
        snippet_info2015_version = self.create_snippet_with_version(self.party2015, 'info', '2014-10-23 18:21:00')

        with current_party_set(self.app, self.party2014), self.app.app_context():
            actual = get_current_version_of_snippet_with_name('info')
            self.assertEqual(actual, snippet_info2014_version)
Ejemplo n.º 2
0
 def test_unknown_name(self):
     with current_party_set(self.app, self.party2014), self.app.app_context():
         with self.assertRaises(SnippetNotFound):
             get_current_version_of_snippet_with_name('totally-unknown-snippet-name')