Пример #1
0
 def test_copy(self):
     period = default_period_name()
     response = self.client.run("copy",
                                eid=1,
                                source_period=period,
                                destination_period=period)
     self.assertEqual(response, "Copied element 2.")
Пример #2
0
    def test_get_period(self):
        period = self.server._get_period(self.period)
        self.assertEqual(period.name, self.period)

        another_period = "foo"
        period = self.server._get_period(another_period)
        self.assertEqual(period.name, another_period)

        period = self.server._get_period(None)
        self.assertEqual(period.name, default_period_name())