flake8 fixes
This commit is contained in:
		
							parent
							
								
									51709c6eaf
								
							
						
					
					
						commit
						0ebcc2f124
					
				
					 4 changed files with 12 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -11,8 +11,9 @@ from symposion.conference.models import Section, Conference
 | 
			
		|||
class ConferenceFactory(factory.DjangoModelFactory):
 | 
			
		||||
    title = fuzzy.FuzzyText()
 | 
			
		||||
    start_date = fuzzy.FuzzyDate(datetime.date(2014, 1, 1))
 | 
			
		||||
    end_date = fuzzy.FuzzyDate(datetime.date(2014, 1, 1) + datetime.timedelta(days=random.randint(1,10)))
 | 
			
		||||
    #timezone = TimeZoneField("UTC")
 | 
			
		||||
    end_date = fuzzy.FuzzyDate(datetime.date(2014, 1, 1)
 | 
			
		||||
                               + datetime.timedelta(days=random.randint(1, 10)))
 | 
			
		||||
    # timezone = TimeZoneField("UTC")
 | 
			
		||||
 | 
			
		||||
    class Meta:
 | 
			
		||||
        model = Conference
 | 
			
		||||
| 
						 | 
				
			
			@ -55,8 +56,8 @@ class DayFactory(factory.DjangoModelFactory):
 | 
			
		|||
class SlotFactory(factory.DjangoModelFactory):
 | 
			
		||||
    day = factory.SubFactory(DayFactory)
 | 
			
		||||
    kind = factory.SubFactory(SlotKindFactory)
 | 
			
		||||
    start = datetime.time(random.randint(0,23), random.randint(0,59))
 | 
			
		||||
    end = datetime.time(random.randint(0,23), random.randint(0,59))
 | 
			
		||||
    start = datetime.time(random.randint(0, 23), random.randint(0, 59))
 | 
			
		||||
    end = datetime.time(random.randint(0, 23), random.randint(0, 59))
 | 
			
		||||
 | 
			
		||||
    class Meta:
 | 
			
		||||
        model = Slot
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,7 +17,6 @@ class ScheduleViewTests(TestCase):
 | 
			
		|||
        assert 'schedule' in conference
 | 
			
		||||
        assert len(conference['schedule']) == 0
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    def test_populated_empty_presentations(self):
 | 
			
		||||
 | 
			
		||||
        factories.SlotFactory.create_batch(size=5)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -164,7 +164,10 @@ def schedule_presentation_detail(request, pk):
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
def schedule_json(request):
 | 
			
		||||
    slots = Slot.objects.filter(day__schedule__published=True, day__schedule__hidden=False).order_by("start")
 | 
			
		||||
    slots = Slot.objects.filter(
 | 
			
		||||
        day__schedule__published=True,
 | 
			
		||||
        day__schedule__hidden=False
 | 
			
		||||
    ).order_by("start")
 | 
			
		||||
 | 
			
		||||
    protocol = request.META.get('HTTP_X_FORWARDED_PROTO', 'http')
 | 
			
		||||
    data = []
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue