Skip to content

Instantly share code, notes, and snippets.

@kelvinndmo
Created February 19, 2019 07:55
Show Gist options
  • Save kelvinndmo/eda8f2cbc9cfe2500d14e7df448262d1 to your computer and use it in GitHub Desktop.
Save kelvinndmo/eda8f2cbc9cfe2500d14e7df448262d1 to your computer and use it in GitHub Desktop.
from django.test import TestCase
from sendy.models import Parcel
# Create your tests here.
class TestParcel(TestCase):
def setUp(self):
self.parcel = Parcels(sender="Kelvin onkundi", email="onkundi@olympians.com", Recipient="Swaleh", recepient_contact="07999999")
self.parcel.save()
def test_create_parcel(self):
self.assertEqual(self.parcel.sender, "Kelvin Onkundi")
def test_parcel_list(self):
self.assertEqual(Parcel.objects.count(),1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment