old_contents: from mock import patch
  
  from breach.tests.base import RuptureTestCase
  from breach.strategy import Strategy
  
  
  class StrategyTestCase(RuptureTestCase):
      @patch('breach.strategy.Sniffer')
      def test_first_round(self, Sniffer):
          strategy0 = Strategy(self.victim)
  
          work0 = strategy0.get_work()
          self.assertEqual(
              work0['url'],
              'https://di.uoa.gr/?breach=^testsecret0^1^'
          )
          self.assertTrue('amount' in work0)
          self.assertTrue('timeout' in work0)
  
          strategy1 = Strategy(self.victim)
  
          work1 = strategy1.get_work()
          self.assertEqual(
              work1['url'],
              'https://di.uoa.gr/?breach=^testsecret1^0^'
          )
  
      def test_same_round_same_batch(self):
          pass
  
      def test_same_round_different_batch(self):
          pass
  
      def test_advance_round(self):
          pass
  
      @patch('breach.strategy.Sniffer')
      def test_alphabet_balance(self, Sniffer):
          strategy_0 = Strategy(self.balance_victim)
          work_0 = strategy_0.get_work()
          self.assertEqual(
              work_0['url'],
              'https://di.uoa.gr/?breach=^testsecret0^testsecret$^testsecret(^1^3^2^'
          )
  
          strategy_1 = Strategy(self.balance_victim)
          work_1 = strategy_1.get_work()
          self.assertEqual(
              work_1['url'],
              'https://di.uoa.gr/?breach=^testsecret3^testsecret2^testsecret1^0^$^(^'
          )
  
new_contents: from django.utils import timezone
  from mock import patch
  
  from breach.tests.base import RuptureTestCase
  from breach.strategy import Strategy
  
  
  class StrategyTestCase(RuptureTestCase):
      @patch('breach.strategy.Sniffer')
      def test_first_round(self, Sniffer):
          strategy0 = Strategy(self.victim)
  
          work0 = strategy0.get_work()
          self.assertEqual(
              work0['url'],
              'https://di.uoa.gr/?breach=^testsecret0^1^'
          )
          self.assertTrue('amount' in work0)
          self.assertTrue('timeout' in work0)
  
          strategy0._mark_current_work_completed()
  
  
          strategy1 = Strategy(self.victim)
  
          work1 = strategy1.get_work()
          self.assertEqual(
              work1['url'],
              'https://di.uoa.gr/?breach=^testsecret1^0^'
          )
  
          strategy1._mark_current_work_completed()
  
      def test_same_round_same_batch(self):
          pass
  
      def test_same_round_different_batch(self):
          pass
  
      def test_advance_round(self):
          pass
  
      @patch('breach.strategy.Sniffer')
      def test_alphabet_balance(self, Sniffer):
          strategy_0 = Strategy(self.balance_victim)
          work_0 = strategy_0.get_work()
          self.assertEqual(
              work_0['url'],
              'https://di.uoa.gr/?breach=^testsecret0^testsecret$^testsecret(^1^3^2^'
          )
  
  
          strategy_0._mark_current_work_completed()
  
          self.assertEqual(
              work_1['url'],
              'https://di.uoa.gr/?breach=^testsecret3^testsecret2^testsecret1^0^$^(^'
          )
  
          strategy_1._mark_current_work_completed()
  
subject: Clean up dangling samplesets after each unit test assertion