def create_target_model(self, suggestion):
     target_key = self.request.get('key-{}'.format(suggestion.key.id()),
                                   suggestion.target_key)
     match = Match.get_by_id(target_key)
     if not match:
         return None
     return MatchSuggestionAccepter.accept_suggestion(match, suggestion)
    def test_accept_suggestions(self):
        MatchSuggestionAccepter.accept_suggestion(self.match, self.suggestion)

        match = Match.get_by_id("2012ct_qm1")
        self.assertTrue("abcdef" in match.youtube_videos)
        self.assertTrue("123456" in match.youtube_videos)
 def create_target_model(self, suggestion):
     target_key = self.request.get('key-{}'.format(suggestion.key.id()), suggestion.target_key)
     match = Match.get_by_id(target_key)
     if not match:
         return None
     return MatchSuggestionAccepter.accept_suggestion(match, suggestion)
 def create_target_model(self, suggestion):
     match = Match.get_by_id(suggestion.target_key)
     return MatchSuggestionAccepter.accept_suggestion(match, suggestion)
Beispiel #5
0
 def create_target_model(self, suggestion):
     match = Match.get_by_id(suggestion.target_key)
     return MatchSuggestionAccepter.accept_suggestion(match, suggestion)
Beispiel #6
0
    def test_accept_suggestions(self):
        MatchSuggestionAccepter.accept_suggestion(self.match, self.suggestion)

        match = Match.get_by_id("2012ct_qm1")
        self.assertTrue("abcdef" in match.youtube_videos)
        self.assertTrue("123456" in match.youtube_videos)