コード例 #1
0
 def test_unmask_right_message(self):
     # Unmasking picks the right message, and doesn't try to violate
     # the unique constraint on is_current_upstream.
     inactive = self.factory.makeSuggestion(self.pofile, self.potmsgset)
     remove_translations(ids=[self.ubuntu.id])
     Store.of(self.upstream).autoreload()
     self.assertTrue(self.upstream.is_current_ubuntu)
     self.assertFalse(inactive.is_current_ubuntu)
コード例 #2
0
 def test_unmask_right_message(self):
     # Unmasking picks the right message, and doesn't try to violate
     # the unique constraint on is_current_upstream.
     inactive = self.factory.makeSuggestion(self.pofile, self.potmsgset)
     remove_translations(ids=[self.ubuntu.id])
     Store.of(self.upstream).autoreload()
     self.assertTrue(self.upstream.is_current_ubuntu)
     self.assertFalse(inactive.is_current_ubuntu)
コード例 #3
0
 def test_unmask_upstream_message(self):
     # Basic use case: upstream message is unmasked.
     remove_translations(ids=[self.ubuntu.id])
     Store.of(self.upstream).autoreload()
     self.assertTrue(self.upstream.is_current_upstream)
     self.assertTrue(self.upstream.is_current_ubuntu)
コード例 #4
0
 def _removeMessages(self, **kwargs):
     """Front-end for `remove_translations`.  Flushes changes first."""
     Store.of(self.potemplate).flush()
     return remove_translations(**kwargs)
コード例 #5
0
 def test_unmask_upstream_message(self):
     # Basic use case: upstream message is unmasked.
     remove_translations(ids=[self.ubuntu.id])
     Store.of(self.upstream).autoreload()
     self.assertTrue(self.upstream.is_current_upstream)
     self.assertTrue(self.upstream.is_current_ubuntu)
コード例 #6
0
 def _removeMessages(self, **kwargs):
     """Front-end for `remove_translations`.  Flushes changes first."""
     Store.of(self.potemplate).flush()
     return remove_translations(**kwargs)