Skip to content

Instantly share code, notes, and snippets.

@singh1114
Last active July 4, 2017 16:18
Show Gist options
  • Save singh1114/394cffef67984240dc6b0a65480a30ce to your computer and use it in GitHub Desktop.
Save singh1114/394cffef67984240dc6b0a65480a30ce to your computer and use it in GitHub Desktop.
from django.test import TestCase
from scanapp.models import ScanInfo
class ScanInfoTestCase(TestCase):
def test_scan_info_added(self):
URL_scan_info = ScanInfo(scan_type="URL", is_complete=True)
local_scan_info = ScanInfo(scan_type="localscan", is_complete=False)
URL_scan_info = ScanInfo.objects.get(scan_type="URL")
local_scan_info = ScanInfo.objects.get(scan_type="localscan")
self.assertEqual(URL_scan_info.is_complete, True)
self.assertEqual(local_scan_info.is_complete, False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment