Beispiel #1
0
 def test_get_calls_format_slug_for_templates(self, mock_format_slug):
     doc = document(title='Template:Test',
                    slug='Template:Test',
                    html='<%= "Test" %>',
                    save=True)
     mock_format_slug.return_value = doc.slug
     kumascript.get(doc, 'no-cache', 'https://testserver')
     ok_(mock_format_slug.called, "format slug should have been called")
Beispiel #2
0
 def test_get_calls_format_slug_for_templates(self, mock_format_slug):
     doc = document(title='Template:Test',
                    slug='Template:Test',
                    html='<%= "Test" %>',
                    save=True)
     mock_format_slug.return_value = doc.slug
     kumascript.get(doc, 'no-cache', 'https://testserver')
     ok_(mock_format_slug.called, "format slug should have been called")
Beispiel #3
0
 def test_get_does_not_call_format_slug_for_docs(self, mock_format_slug):
     doc = document(title='Test',
                    slug='Test',
                    html='Test',
                    save=True)
     mock_format_slug.return_value = doc.slug
     kumascript.get(doc, 'no-cache', 'https://testserver')
     ok_(not mock_format_slug.called,
         "format slug should not have been called")
Beispiel #4
0
 def test_get_does_not_call_format_slug_for_docs(self, mock_format_slug):
     doc = document(title='Test',
                    slug='Test',
                    html='Test',
                    save=True)
     mock_format_slug.return_value = doc.slug
     kumascript.get(doc, 'no-cache', 'https://testserver')
     ok_(not mock_format_slug.called,
         "format slug should not have been called")