From 336ea5ac8b2d922fb54f99edd55d4773dd126934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Barrois?= Date: Tue, 18 Nov 2014 00:35:19 +0100 Subject: Remove deprecated features. This disables the ``FACTORY_FOR`` syntax and related parameters, that should be declared through ``class Meta``. --- tests/test_declarations.py | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'tests/test_declarations.py') diff --git a/tests/test_declarations.py b/tests/test_declarations.py index 86bc8b5..18a4cd4 100644 --- a/tests/test_declarations.py +++ b/tests/test_declarations.py @@ -22,7 +22,6 @@ import datetime import itertools -import warnings from factory import declarations from factory import helpers @@ -207,20 +206,6 @@ class FactoryWrapperTestCase(unittest.TestCase): datetime.date = orig_date -class RelatedFactoryTestCase(unittest.TestCase): - - def test_deprecate_name(self): - with warnings.catch_warnings(record=True) as w: - - warnings.simplefilter('always') - f = declarations.RelatedFactory('datetime.date', name='blah') - - self.assertEqual('blah', f.name) - self.assertEqual(1, len(w)) - self.assertIn('RelatedFactory', str(w[0].message)) - self.assertIn('factory_related_name', str(w[0].message)) - - class PostGenerationMethodCallTestCase(unittest.TestCase): def setUp(self): self.obj = mock.MagicMock() -- cgit v1.2.3 From a1e5ff13c0573feb95c810e7e27cd30de97b8f21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Barrois?= Date: Thu, 26 Mar 2015 23:45:29 +0100 Subject: Update header years. --- tests/test_declarations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/test_declarations.py') diff --git a/tests/test_declarations.py b/tests/test_declarations.py index 18a4cd4..2601a38 100644 --- a/tests/test_declarations.py +++ b/tests/test_declarations.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2010 Mark Sandstrom -# Copyright (c) 2011-2013 Raphaël Barrois +# Copyright (c) 2011-2015 Raphaël Barrois # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal -- cgit v1.2.3