Stubbing in /newsletters receive endpoint for mailgun routes.

This commit is contained in:
Samuel Clay 2016-02-09 13:43:57 -08:00
parent b4da6061c1
commit 08b5e0dcad
5 changed files with 31 additions and 0 deletions

View file

View file

@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

16
apps/newsletters/tests.py Normal file
View file

@ -0,0 +1,16 @@
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
"""
self.assertEqual(1 + 1, 2)

6
apps/newsletters/urls.py Normal file
View file

@ -0,0 +1,6 @@
from django.conf.urls import *
from apps.newsletters import views
urlpatterns = patterns('',
url(r'^/?$', views.newsletter_receive, name='newsletter-receive'),
)

View file

@ -0,0 +1,6 @@
from django.http import HttpResponse, Http404
def newsletter_receive(request):
print request.REQUEST
response = HttpResponse('OK')
return response