Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Commit

Permalink
feat: Update Testcases for python- 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
satya7289 committed Aug 20, 2020
1 parent ad4e716 commit ffa27d9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions systers_portal/meetup/tests/test_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ def test_request_meetup_form_with_past_date(self):
date = (timezone.now() - timedelta(2)).date()
time = timezone.now().time()
data = {'title': 'Foo', 'slug': 'foo', 'date': date, 'time': time,
'meetup_location': self.location,
'meetup_location': self.location.id,
'description': "It's a test meetup."}
form = AddMeetupForm(data=data, created_by=self.systers_user, leader=self.systers_user)
form = RequestMeetupForm(data=data, created_by=self.systers_user)
self.assertFalse(form.is_valid())
self.assertTrue(form.errors['date'], ["Date should not be before today's date."])

Expand All @@ -72,13 +72,12 @@ def test_request_meetup_form_with_passed_time(self):
date = timezone.now().date()
time = (timezone.now() - timedelta(2)).time()
data = {'title': 'Foo', 'slug': 'foo', 'date': date, 'time': time,
'meetup_location': self.location,
'meetup_location': self.location.id,
'description': "It's a test meetup."}
form = AddMeetupForm(data=data, created_by=self.systers_user, leader=self.systers_user)
form = RequestMeetupForm(data=data, created_by=self.systers_user)
self.assertFalse(form.is_valid())
self.assertTrue(form.errors['time'],
["Time should not be a time that has already passed."])
self.assertRaises(ValidationError, form.clean_time())


class AddMeetupFormTestCase(MeetupFormTestCaseBase, TestCase):
Expand Down

0 comments on commit ffa27d9

Please sign in to comment.