Beispiel #1
0
    def map_correct_alphabet_to_digit(self):
        """Map correct alphabets to digits and ignore all non-literal symbol."""
        test_one = MyRESTView.string_processing('a')
        test_two = MyRESTView.string_processing('w')

        self.assertEqual(test_one, 1)
        self.assertEqual(test_two, 23)
        self.assertEqual(test_two, 24)
Beispiel #2
0
from django.conf.urls import patterns, include, url

from rest_framework import routers

from strings_convertions.views import home, MyRESTView


urlpatterns = patterns(
    '',
    url(r'^$', home, name='home'),
    url(r'^restfull-api/$', MyRESTView.as_view(), name='restfull_api'),
)